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

commit ba117350eb3068ca7c2edf31a62c558530b9d86d
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Tue Dec 28 09:49:36 2021 +0900
Commit:     Katayama Hirofumi MZ <[email protected]>
CommitDate: Tue Dec 28 09:49:36 2021 +0900

    [MSPAINT] Add const to some ImageModel methods
    
    CORE-17931
---
 base/applications/mspaint/history.cpp | 10 +++++-----
 base/applications/mspaint/history.h   | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/base/applications/mspaint/history.cpp 
b/base/applications/mspaint/history.cpp
index b9f206cb165..221dffc52d7 100644
--- a/base/applications/mspaint/history.cpp
+++ b/base/applications/mspaint/history.cpp
@@ -164,17 +164,17 @@ void ImageModel::SaveImage(LPTSTR lpFileName)
     SaveDIBToFile(hBms[currInd], lpFileName, hDrawingDC);
 }
 
-BOOL ImageModel::IsImageSaved()
+BOOL ImageModel::IsImageSaved() const
 {
     return imageSaved;
 }
 
-BOOL ImageModel::HasUndoSteps()
+BOOL ImageModel::HasUndoSteps() const
 {
     return undoSteps > 0;
 }
 
-BOOL ImageModel::HasRedoSteps()
+BOOL ImageModel::HasRedoSteps() const
 {
     return redoSteps > 0;
 }
@@ -191,12 +191,12 @@ void ImageModel::StretchSkew(int nStretchPercentX, int 
nStretchPercentY, int nSk
     NotifyImageChanged();
 }
 
-int ImageModel::GetWidth()
+int ImageModel::GetWidth() const
 {
     return GetDIBWidth(hBms[currInd]);
 }
 
-int ImageModel::GetHeight()
+int ImageModel::GetHeight() const
 {
     return GetDIBHeight(hBms[currInd]);
 }
diff --git a/base/applications/mspaint/history.h 
b/base/applications/mspaint/history.h
index 1c5110f7306..587d9c2e7a7 100644
--- a/base/applications/mspaint/history.h
+++ b/base/applications/mspaint/history.h
@@ -30,12 +30,12 @@ public:
     void Insert(HBITMAP hbm);
     void Crop(int nWidth, int nHeight, int nOffsetX = 0, int nOffsetY = 0);
     void SaveImage(LPTSTR lpFileName);
-    BOOL IsImageSaved();
-    BOOL HasUndoSteps();
-    BOOL HasRedoSteps();
+    BOOL IsImageSaved() const;
+    BOOL HasUndoSteps() const;
+    BOOL HasRedoSteps() const;
     void StretchSkew(int nStretchPercentX, int nStretchPercentY, int nSkewDegX 
= 0, int nSkewDegY = 0);
-    int GetWidth();
-    int GetHeight();
+    int GetWidth() const;
+    int GetHeight() const;
     void InvertColors();
     void Clear(COLORREF color = 0x00ffffff);
     HDC GetDC();

Reply via email to