[MSPAINT] ToolBase::m_tool is not used. Delete it

Refactoring. CORE-19094
This commit is contained in:
Katayama Hirofumi MZ 2023-11-23 16:37:13 +09:00
parent 1aeebfdacb
commit 96e48dcd01
2 changed files with 11 additions and 12 deletions

View file

@ -128,7 +128,7 @@ struct FreeSelTool : ToolBase
{ {
BOOL m_bLeftButton = FALSE; BOOL m_bLeftButton = FALSE;
FreeSelTool() : ToolBase(TOOL_FREESEL) FreeSelTool()
{ {
} }
@ -218,7 +218,7 @@ struct RectSelTool : ToolBase
{ {
BOOL m_bLeftButton = FALSE; BOOL m_bLeftButton = FALSE;
RectSelTool() : ToolBase(TOOL_RECTSEL) RectSelTool()
{ {
} }
@ -300,7 +300,7 @@ struct TwoPointDrawTool : ToolBase
BOOL m_bLeftButton = FALSE; BOOL m_bLeftButton = FALSE;
BOOL m_bDrawing = 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_bShiftDown = FALSE;
BOOL m_bLeftButton = FALSE; BOOL m_bLeftButton = FALSE;
SmoothDrawTool(TOOLTYPE type) : ToolBase(type) SmoothDrawTool(TOOLTYPE type)
{ {
} }
@ -533,7 +533,7 @@ struct RubberTool : SmoothDrawTool
// TOOL_FILL // TOOL_FILL
struct FillTool : ToolBase struct FillTool : ToolBase
{ {
FillTool() : ToolBase(TOOL_FILL) FillTool()
{ {
} }
@ -547,7 +547,7 @@ struct FillTool : ToolBase
// TOOL_COLOR // TOOL_COLOR
struct ColorTool : ToolBase struct ColorTool : ToolBase
{ {
ColorTool() : ToolBase(TOOL_COLOR) ColorTool()
{ {
} }
@ -585,7 +585,7 @@ struct ZoomTool : ToolBase
{ {
BOOL m_bZoomed = FALSE; BOOL m_bZoomed = FALSE;
ZoomTool() : ToolBase(TOOL_ZOOM) ZoomTool()
{ {
} }
@ -719,7 +719,7 @@ struct AirBrushTool : SmoothDrawTool
// TOOL_TEXT // TOOL_TEXT
struct TextTool : ToolBase struct TextTool : ToolBase
{ {
TextTool() : ToolBase(TOOL_TEXT) TextTool()
{ {
} }
@ -872,7 +872,7 @@ struct BezierTool : ToolBase
{ {
BOOL m_bLeftButton = FALSE; BOOL m_bLeftButton = FALSE;
BezierTool() : ToolBase(TOOL_BEZIER) BezierTool()
{ {
} }
@ -974,7 +974,7 @@ struct ShapeTool : ToolBase
BOOL m_bLeftButton = FALSE; BOOL m_bLeftButton = FALSE;
BOOL m_bClosed = FALSE; BOOL m_bClosed = FALSE;
ShapeTool() : ToolBase(TOOL_SHAPE) ShapeTool()
{ {
} }

View file

@ -40,12 +40,11 @@ enum BrushStyle
struct ToolBase struct ToolBase
{ {
TOOLTYPE m_tool;
HDC m_hdc; HDC m_hdc;
COLORREF m_fg, m_bg; COLORREF m_fg, m_bg;
static SIZE_T s_pointSP; static SIZE_T s_pointSP;
ToolBase(TOOLTYPE tool) : m_tool(tool), m_hdc(NULL) { } ToolBase() : m_hdc(NULL) { }
virtual ~ToolBase() { } virtual ~ToolBase() { }
virtual void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) { } virtual void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) { }