https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4331b47c505eb4431c888fbfee9bd9d876893d63

commit 4331b47c505eb4431c888fbfee9bd9d876893d63
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Tue Dec 28 09:47:13 2021 +0900
Commit:     Katayama Hirofumi MZ <[email protected]>
CommitDate: Tue Dec 28 09:47:13 2021 +0900

    [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);
 };

Reply via email to