https://git.reactos.org/?p=reactos.git;a=commitdiff;h=102898191d769df573b87…
commit 102898191d769df573b8749f252e23eea03b0ce2
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Dec 27 20:08:07 2021 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Dec 27 20:08:07 2021 +0900
[MSPAINT] Add const to ToolsModel methods (#4190)
Add const keywords to some methods of ToolsModel class. CORE-17931
---
base/applications/mspaint/toolsmodel.cpp | 14 +++++++-------
base/applications/mspaint/toolsmodel.h | 14 +++++++-------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/base/applications/mspaint/toolsmodel.cpp
b/base/applications/mspaint/toolsmodel.cpp
index 26621e75ee8..36a521f7b3d 100644
--- a/base/applications/mspaint/toolsmodel.cpp
+++ b/base/applications/mspaint/toolsmodel.cpp
@@ -24,7 +24,7 @@ ToolsModel::ToolsModel()
m_zoom = 1000;
}
-int ToolsModel::GetLineWidth()
+int ToolsModel::GetLineWidth() const
{
return m_lineWidth;
}
@@ -35,7 +35,7 @@ void ToolsModel::SetLineWidth(int nLineWidth)
NotifyToolSettingsChanged();
}
-int ToolsModel::GetShapeStyle()
+int ToolsModel::GetShapeStyle() const
{
return m_shapeStyle;
}
@@ -46,7 +46,7 @@ void ToolsModel::SetShapeStyle(int nShapeStyle)
NotifyToolSettingsChanged();
}
-int ToolsModel::GetBrushStyle()
+int ToolsModel::GetBrushStyle() const
{
return m_brushStyle;
}
@@ -57,7 +57,7 @@ void ToolsModel::SetBrushStyle(int nBrushStyle)
NotifyToolSettingsChanged();
}
-int ToolsModel::GetActiveTool()
+int ToolsModel::GetActiveTool() const
{
return m_activeTool;
}
@@ -68,7 +68,7 @@ void ToolsModel::SetActiveTool(int nActiveTool)
NotifyToolChanged();
}
-int ToolsModel::GetAirBrushWidth()
+int ToolsModel::GetAirBrushWidth() const
{
return m_airBrushWidth;
}
@@ -79,7 +79,7 @@ void ToolsModel::SetAirBrushWidth(int nAirBrushWidth)
NotifyToolSettingsChanged();
}
-int ToolsModel::GetRubberRadius()
+int ToolsModel::GetRubberRadius() const
{
return m_rubberRadius;
}
@@ -90,7 +90,7 @@ void ToolsModel::SetRubberRadius(int nRubberRadius)
NotifyToolSettingsChanged();
}
-BOOL ToolsModel::IsBackgroundTransparent()
+BOOL ToolsModel::IsBackgroundTransparent() const
{
return m_transpBg;
}
diff --git a/base/applications/mspaint/toolsmodel.h
b/base/applications/mspaint/toolsmodel.h
index 3b7205634f6..104da42637c 100644
--- a/base/applications/mspaint/toolsmodel.h
+++ b/base/applications/mspaint/toolsmodel.h
@@ -28,19 +28,19 @@ private:
public:
ToolsModel();
- int GetLineWidth();
+ int GetLineWidth() const;
void SetLineWidth(int nLineWidth);
- int GetShapeStyle();
+ int GetShapeStyle() const;
void SetShapeStyle(int nShapeStyle);
- int GetBrushStyle();
+ int GetBrushStyle() const;
void SetBrushStyle(int nBrushStyle);
- int GetActiveTool();
+ int GetActiveTool() const;
void SetActiveTool(int nActiveTool);
- int GetAirBrushWidth();
+ int GetAirBrushWidth() const;
void SetAirBrushWidth(int nAirBrushWidth);
- int GetRubberRadius();
+ int GetRubberRadius() const;
void SetRubberRadius(int nRubberRadius);
- BOOL IsBackgroundTransparent();
+ BOOL IsBackgroundTransparent() const;
void SetBackgroundTransparent(BOOL bTransparent);
int GetZoom() const;
void SetZoom(int nZoom);