diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-18 12:30:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-29 12:43:37 +0200 |
commit | 1820fcbbc38e82daf43ebe759200050ce05b3fe1 (patch) | |
tree | f5a494e6a437971ef7b9ae003547d4b156bb8b13 /cui | |
parent | 66889d5219cec22bd0e654e5a812e90cdd04e59d (diff) |
constmethod for accessor-type methods
Apply the constmethod plugin, but only to accessor-type methods, e.g.
IsFoo(), GetBar(), etc, where we can be sure of that
constifying is a reasonable thing to do.
Change-Id: Ibc97f5f359a0992dd1ce2d66f0189f8a0a43d98a
Reviewed-on: https://gerrit.libreoffice.org/74269
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optcolor.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 0a3d11931638..3456783101b3 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -176,7 +176,7 @@ public: Link<weld::Widget&,void> const&); void Update(EditableColorConfig const*, EditableExtendedColorConfig const*); void ClickHdl(EditableColorConfig*, weld::ToggleButton&); - void ColorHdl(EditableColorConfig*, EditableExtendedColorConfig*, ColorListBox*); + void ColorHdl(EditableColorConfig*, EditableExtendedColorConfig*, const ColorListBox*); weld::Widget& GetWidget1() { @@ -226,8 +226,8 @@ private: void ColorChanged (ColorConfigValue&); void ColorChanged (ExtendedColorConfigValue&); public: - bool Is(weld::ToggleButton* pBox) const { return m_xText.get() == pBox; } - bool Is(ColorListBox* pBox) const { return m_xColorList.get() == pBox; } + bool Is(const weld::ToggleButton* pBox) const { return m_xText.get() == pBox; } + bool Is(const ColorListBox* pBox) const { return m_xColorList.get() == pBox; } private: // checkbox (CheckBox) or simple text (FixedText) std::unique_ptr<weld::Widget> m_xText; @@ -513,7 +513,7 @@ void ColorConfigWindow_Impl::ClickHdl(EditableColorConfig* pConfig, weld::Toggle // ColorHdl() void ColorConfigWindow_Impl::ColorHdl( EditableColorConfig* pConfig, EditableExtendedColorConfig* pExtConfig, - ColorListBox* pBox) + const ColorListBox* pBox) { unsigned i = 0; |