[LyX/master] Avoid static members zoom_min_ and zoom_max_
Kornel Benko
kornel at lyx.org
Wed Feb 9 11:17:42 UTC 2022
Am Wed, 9 Feb 2022 10:27:06 +0100 (CET)
schrieb Stephan Witt <switt at lyx.org>:
> commit cd995a2bc6449c8d9d3dee494ecffcf9abdcb50f
> Author: Stephan Witt <switt at lyx.org>
> Date: Wed Feb 9 10:59:18 2022 +0100
>
> Avoid static members zoom_min_ and zoom_max_
>
> Some compilers cannot use static class members by reference. std::min() and
> std::max() are passing parameters by const reference. ---
> src/frontends/qt/GuiView.h | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/frontends/qt/GuiView.h b/src/frontends/qt/GuiView.h
> index bd39d26..27d230b 100644
> --- a/src/frontends/qt/GuiView.h
> +++ b/src/frontends/qt/GuiView.h
> @@ -519,9 +519,9 @@ private:
> /// from the default zoom pref
> double zoom_ratio_ = 1.0;
> /// 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
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/dc4a02c0/attachment.asc>
More information about the lyx-devel
mailing list