From 6b6200314f1ba54af9fe5f0b452eb7d191642893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Batty=C3=A1nyi?= <86350313+LoKolbasz@users.noreply.github.com> Date: Sun, 20 Aug 2023 13:38:24 +0200 Subject: [PATCH] Member functions changed to const The following member functions and methods of SpotPicker changed to const: - get_active() - get_spot_half_width() - selecterSetup() - spotButtonTemplate(). --- rtgui/guiutils.cc | 4 ++-- rtgui/guiutils.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rtgui/guiutils.cc b/rtgui/guiutils.cc index 7e36441fb..cb99b04a5 100644 --- a/rtgui/guiutils.cc +++ b/rtgui/guiutils.cc @@ -1989,7 +1989,7 @@ Gtk::Label SpotPicker::labelSetup(Glib::ustring const &key) const return label; } -MyComboBoxText SpotPicker::selecterSetup() +MyComboBoxText SpotPicker::selecterSetup() const { MyComboBoxText spotSize = MyComboBoxText(); setExpandAlignProperties(&spotSize, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); @@ -2025,7 +2025,7 @@ MyComboBoxText SpotPicker::selecterSetup() return spotSize; } -Gtk::ToggleButton SpotPicker::spotButtonTemplate(Glib::ustring const &key, const Glib::ustring &tooltip) +Gtk::ToggleButton SpotPicker::spotButtonTemplate(Glib::ustring const &key, const Glib::ustring &tooltip) const { Gtk::ToggleButton spotButton = Gtk::ToggleButton(key); setExpandAlignProperties(&spotButton, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); diff --git a/rtgui/guiutils.h b/rtgui/guiutils.h index 9683899f0..221a56814 100644 --- a/rtgui/guiutils.h +++ b/rtgui/guiutils.h @@ -728,7 +728,7 @@ class SpotPicker : public Gtk::Grid Gtk::ToggleButton _spotButton; public: SpotPicker(int const defaultValue, Glib::ustring const &buttonKey, Glib::ustring const &buttonTooltip, Glib::ustring const &labelKey); - inline bool get_active() + inline bool get_active() const { return _spotButton.get_active(); } @@ -736,7 +736,7 @@ class SpotPicker : public Gtk::Grid { _spotButton.set_active(b); } - int get_spot_half_width() + int get_spot_half_width() const { return _spotHalfWidth; } @@ -751,8 +751,8 @@ class SpotPicker : public Gtk::Grid protected: Gtk::Label labelSetup(Glib::ustring const &key) const; - MyComboBoxText selecterSetup(); - static Gtk::ToggleButton spotButtonTemplate(Glib::ustring const &key, const Glib::ustring &tooltip); + MyComboBoxText selecterSetup() const; + Gtk::ToggleButton spotButtonTemplate(Glib::ustring const &key, const Glib::ustring &tooltip) const; void spotSizeChanged(); };