[MSPAINT] Add const to some PaletteModel methods

CORE-17931
This commit is contained in:
Katayama Hirofumi MZ 2021-12-28 09:47:13 +09:00
parent 188f5dc50a
commit 4331b47c50
2 changed files with 6 additions and 6 deletions

View file

@ -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;
}

View file

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