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 | 3b27764005873fe9f7e9356ed1f7f0e092cf6136 (patch) | |
tree | 5f004dbda4373af45885bbc9cb673248ba629b64 /src | |
parent | a7491a3482a92ad65a9a328dcc4390ca74cb43db (diff) | |
download | scintilla-mirror-3b27764005873fe9f7e9356ed1f7f0e092cf6136.tar.gz |
Backport: Mark pointer argument as const as not written to.
Backport of changeset 6468:9ed7929c7900.
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 f33e5b588..3274d240c 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); |