[vlc-devel] [PATCH 2/2] move pointer to .rodata

Rémi Denis-Courmont remi at remlab.net
Mon Jun 22 19:10:54 CEST 2009


Le dimanche 14 juin 2009 23:50:47 Francois Cartegnie, vous avez écrit :
> ---
>  modules/gui/qt4/components/preferences_widgets.cpp |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/modules/gui/qt4/components/preferences_widgets.cpp
> b/modules/gui/qt4/components/preferences_widgets.cpp index 309cf16..e71a3dc
> 100644
> --- a/modules/gui/qt4/components/preferences_widgets.cpp
> +++ b/modules/gui/qt4/components/preferences_widgets.cpp
> @@ -214,9 +214,9 @@ void InterfacePreviewWidget::setPreview( int comboid )
>      /* Need to move resources references as soon as qt4.cpp
>         local defines has been moved somewhere else
>      */
> -    char * pixmaps[] = { ":/prefsmenu/sample_classic",
> -                         ":/prefsmenu/sample_complete",
> -                         ":/prefsmenu/sample_minimal" };
> +    const char * const pixmaps[] = { ":/prefsmenu/sample_classic",
> +                        ":/prefsmenu/sample_complete",
> +                        ":/prefsmenu/sample_minimal" };
>      setPixmap( QPixmap( pixmaps[ comboid ] ) );
>  }

Please use a flat char matrix here. Your patch looks nice, but it barely 
addresses the inefficiency in practice.

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list