[LyX/master] Avoid static members zoom_min_ and zoom_max_

Jean-Marc Lasgouttes lasgouttes at lyx.org
Wed Feb 9 11:27:46 UTC 2022


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).

Do as you prefer.

JMarc


More information about the lyx-devel mailing list