[LyX/master] Avoid static members zoom_min_ and zoom_max_
Kornel Benko
kornel at lyx.org
Wed Feb 9 11:39:49 UTC 2022
Am Wed, 9 Feb 2022 12:27:46 +0100
schrieb Jean-Marc Lasgouttes <lasgouttes at lyx.org>:
> Le 09/02/2022 à 12:17, Kornel Benko a écrit :
> >> /// Minimum zoom percentage
> >> - static int const zoom_min_ = 10;
> >> + int const zoom_min_ = 10;
> >> /// Maximum zoom percentage
> >> - static int const zoom_max_ = 1000;
> >> + int const zoom_max_ = 1000;
> >>
> >> // movability flag of all toolbars
> >> bool toolbarsMovable_;
> >
> > I still think we should keep 'const', but do the initialization in GuiView.cpp
>
> We try to use initialization at declaration time as much as possible, I
> find it much nicer for constructors.
>
> Here it is different, but what is the gain of this declaration of
> constants in two places? I find it awful.
>
> Of course, there is no good reason for having this part of the class
> definition. The constants could be moved to go at the top of GuiView.cpp
> (in this case, they should lose the trailing underscore).
Hm, since they are declared inside private part of class GuiView, the trailing underscore
feels OK to me.
> Do as you prefer.
> JMarc
I'd like the expert to struggle :)
Kornel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220209/0daecfc7/attachment-0001.asc>
More information about the lyx-devel
mailing list