From 43cf52deec62e117f7893176e48a1b230c1af7f5 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 1 Mar 2018 10:28:48 +1100 Subject: Mark pointer argument as const as not written to. --- src/Editor.cxx | 12 ++++++------ src/Editor.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index cc7b09715..55c540145 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4457,7 +4457,7 @@ void Editor::DwellEnd(bool mouseMoved) { } void Editor::MouseLeave() { - SetHotSpotRange(NULL); + SetHotSpotRange(nullptr); if (!HaveMouseCapture()) { ptMouseLast = Point(-1,-1); DwellEnd(true); @@ -4692,7 +4692,7 @@ void Editor::SetHoverIndicatorPoint(Point pt) { } } -void Editor::SetHotSpotRange(Point *pt) { +void Editor::SetHotSpotRange(const Point *pt) { if (pt) { Sci::Position pos = PositionFromLocation(*pt, false, true); @@ -4812,7 +4812,7 @@ void Editor::ButtonMoveWithModifiers(Point pt, unsigned int, int modifiers) { EnsureCaretVisible(false, false, true); if (hotspot.Valid() && !PointIsHotspot(pt)) - SetHotSpotRange(NULL); + SetHotSpotRange(nullptr); if (hotSpotClickPos != INVALID_POSITION && PositionFromLocation(pt,true,true) != hotSpotClickPos) { if (inDragDrop == ddNone) { @@ -4825,7 +4825,7 @@ void Editor::ButtonMoveWithModifiers(Point pt, unsigned int, int modifiers) { if (vs.fixedColumnWidth > 0) { // There is a margin if (PointInSelMargin(pt)) { DisplayCursor(GetMarginCursor(pt)); - SetHotSpotRange(NULL); + SetHotSpotRange(nullptr); return; // No need to test for selection } } @@ -4842,7 +4842,7 @@ void Editor::ButtonMoveWithModifiers(Point pt, unsigned int, int modifiers) { DisplayCursor(Window::cursorHand); else DisplayCursor(Window::cursorText); - SetHotSpotRange(NULL); + SetHotSpotRange(nullptr); } } } @@ -4872,7 +4872,7 @@ void Editor::ButtonUpWithModifiers(Point pt, unsigned int curTime, int modifiers DisplayCursor(GetMarginCursor(pt)); } else { DisplayCursor(Window::cursorText); - SetHotSpotRange(NULL); + SetHotSpotRange(nullptr); } ptMouseLast = pt; SetMouseCapture(false); diff --git a/src/Editor.h b/src/Editor.h index af7586934..44255016a 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -550,7 +550,7 @@ protected: // ScintillaBase subclass needs access to much of Editor bool PositionIsHotspot(Sci::Position position) const; bool PointIsHotspot(Point pt); - void SetHotSpotRange(Point *pt); + void SetHotSpotRange(const Point *pt); Range GetHotSpotRange() const override; void SetHoverIndicatorPosition(Sci::Position position); void SetHoverIndicatorPoint(Point pt); -- cgit v1.2.3