From 4331b47c505eb4431c888fbfee9bd9d876893d63 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Tue, 28 Dec 2021 09:47:13 +0900 Subject: [PATCH] [MSPAINT] Add const to some PaletteModel methods CORE-17931 --- base/applications/mspaint/palettemodel.cpp | 6 +++--- base/applications/mspaint/palettemodel.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/base/applications/mspaint/palettemodel.cpp b/base/applications/mspaint/palettemodel.cpp index 2236b06d6f0..021a9e0af7f 100644 --- a/base/applications/mspaint/palettemodel.cpp +++ b/base/applications/mspaint/palettemodel.cpp @@ -48,7 +48,7 @@ void PaletteModel::SelectPalette(int nPalette) NotifyPaletteChanged(); } -int PaletteModel::GetColor(int nIndex) +int PaletteModel::GetColor(int nIndex) const { if (nIndex < 28) return m_colors[nIndex]; @@ -65,7 +65,7 @@ void PaletteModel::SetColor(int nIndex, int newColor) } } -int PaletteModel::GetFgColor() +int PaletteModel::GetFgColor() const { return m_fgColor; } @@ -76,7 +76,7 @@ void PaletteModel::SetFgColor(int newColor) NotifyColorChanged(); } -int PaletteModel::GetBgColor() +int PaletteModel::GetBgColor() const { return m_bgColor; } diff --git a/base/applications/mspaint/palettemodel.h b/base/applications/mspaint/palettemodel.h index 04c86dbc664..2dccc2aa405 100644 --- a/base/applications/mspaint/palettemodel.h +++ b/base/applications/mspaint/palettemodel.h @@ -25,10 +25,10 @@ public: PaletteModel(); int SelectedPalette(); void SelectPalette(int nPalette); - int GetColor(int nIndex); + int GetColor(int nIndex) const; void SetColor(int nIndex, int newColor); - int GetFgColor(); + int GetFgColor() const; void SetFgColor(int newColor); - int GetBgColor(); + int GetBgColor() const; void SetBgColor(int newColor); };