diff options
author | Neil <nyamatongwe@gmail.com> | 2018-03-01 10:28:48 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-03-01 10:28:48 +1100 |
commit | 43cf52deec62e117f7893176e48a1b230c1af7f5 (patch) | |
tree | 6d67d442a4780bc53954ad23480034b9adf9ba68 /src | |
parent | 949edbb7f0d40f1e71750ecfcf0521562057b9d3 (diff) | |
download | scintilla-mirror-43cf52deec62e117f7893176e48a1b230c1af7f5.tar.gz |
Mark pointer argument as const as not written to.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 12 | ||||
-rw-r--r-- | src/Editor.h | 2 |
2 files changed, 7 insertions, 7 deletions
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); |