https://git.reactos.org/?p=reactos.git;a=commitdiff;h=96e48dcd01a413c7a939e…
commit 96e48dcd01a413c7a939e666823c899f92a0b9d7
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Thu Nov 23 16:37:13 2023 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Thu Nov 23 16:37:13 2023 +0900
[MSPAINT] ToolBase::m_tool is not used. Delete it
Refactoring. CORE-19094
---
base/applications/mspaint/mouse.cpp | 20 ++++++++++----------
base/applications/mspaint/toolsmodel.h | 3 +--
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/base/applications/mspaint/mouse.cpp b/base/applications/mspaint/mouse.cpp
index 8ca0415f226..0ef737c338f 100644
--- a/base/applications/mspaint/mouse.cpp
+++ b/base/applications/mspaint/mouse.cpp
@@ -128,7 +128,7 @@ struct FreeSelTool : ToolBase
{
BOOL m_bLeftButton = FALSE;
- FreeSelTool() : ToolBase(TOOL_FREESEL)
+ FreeSelTool()
{
}
@@ -218,7 +218,7 @@ struct RectSelTool : ToolBase
{
BOOL m_bLeftButton = FALSE;
- RectSelTool() : ToolBase(TOOL_RECTSEL)
+ RectSelTool()
{
}
@@ -300,7 +300,7 @@ struct TwoPointDrawTool : ToolBase
BOOL m_bLeftButton = FALSE;
BOOL m_bDrawing = FALSE;
- TwoPointDrawTool(TOOLTYPE type) : ToolBase(type)
+ TwoPointDrawTool(TOOLTYPE type)
{
}
@@ -440,7 +440,7 @@ struct SmoothDrawTool : ToolBase
BOOL m_bShiftDown = FALSE;
BOOL m_bLeftButton = FALSE;
- SmoothDrawTool(TOOLTYPE type) : ToolBase(type)
+ SmoothDrawTool(TOOLTYPE type)
{
}
@@ -533,7 +533,7 @@ struct RubberTool : SmoothDrawTool
// TOOL_FILL
struct FillTool : ToolBase
{
- FillTool() : ToolBase(TOOL_FILL)
+ FillTool()
{
}
@@ -547,7 +547,7 @@ struct FillTool : ToolBase
// TOOL_COLOR
struct ColorTool : ToolBase
{
- ColorTool() : ToolBase(TOOL_COLOR)
+ ColorTool()
{
}
@@ -585,7 +585,7 @@ struct ZoomTool : ToolBase
{
BOOL m_bZoomed = FALSE;
- ZoomTool() : ToolBase(TOOL_ZOOM)
+ ZoomTool()
{
}
@@ -719,7 +719,7 @@ struct AirBrushTool : SmoothDrawTool
// TOOL_TEXT
struct TextTool : ToolBase
{
- TextTool() : ToolBase(TOOL_TEXT)
+ TextTool()
{
}
@@ -872,7 +872,7 @@ struct BezierTool : ToolBase
{
BOOL m_bLeftButton = FALSE;
- BezierTool() : ToolBase(TOOL_BEZIER)
+ BezierTool()
{
}
@@ -974,7 +974,7 @@ struct ShapeTool : ToolBase
BOOL m_bLeftButton = FALSE;
BOOL m_bClosed = FALSE;
- ShapeTool() : ToolBase(TOOL_SHAPE)
+ ShapeTool()
{
}
diff --git a/base/applications/mspaint/toolsmodel.h
b/base/applications/mspaint/toolsmodel.h
index 903ac33f632..668c7820bb3 100644
--- a/base/applications/mspaint/toolsmodel.h
+++ b/base/applications/mspaint/toolsmodel.h
@@ -40,12 +40,11 @@ enum BrushStyle
struct ToolBase
{
- TOOLTYPE m_tool;
HDC m_hdc;
COLORREF m_fg, m_bg;
static SIZE_T s_pointSP;
- ToolBase(TOOLTYPE tool) : m_tool(tool), m_hdc(NULL) { }
+ ToolBase() : m_hdc(NULL) { }
virtual ~ToolBase() { }
virtual void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) { }