diff options
author | Neil <nyamatongwe@gmail.com> | 2019-03-18 19:22:38 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-03-18 19:22:38 +1100 |
commit | 983d5165878df0190964a8f903c24055f9144612 (patch) | |
tree | 8f88b9eecbb4ee07725af5bafed081c68a453016 /src/ScintillaBase.cxx | |
parent | b52af20e7318e19b2becf5b191d22d6ccb7139b2 (diff) | |
download | scintilla-mirror-983d5165878df0190964a8f903c24055f9144612.tar.gz |
Add some operators to Point to simplify client code.
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r-- | src/ScintillaBase.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 68cdd7f2b..3fab6b767 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -276,9 +276,7 @@ void ScintillaBase::AutoCompleteStart(Sci::Position lenEntered, const char *list pt = PointMainCaret(); } if (wMargin.Created()) { - const Point ptOrigin = GetVisibleOriginInMain(); - pt.x += ptOrigin.x; - pt.y += ptOrigin.y; + pt = pt + GetVisibleOriginInMain(); } PRectangle rcac; rcac.left = pt.x - ac.lb->CaretFromEdge(); @@ -463,9 +461,7 @@ void ScintillaBase::CallTipShow(Point pt, const char *defn) { ct.SetForeBack(vs.styles[STYLE_CALLTIP].fore, vs.styles[STYLE_CALLTIP].back); } if (wMargin.Created()) { - const Point ptOrigin = GetVisibleOriginInMain(); - pt.x += ptOrigin.x; - pt.y += ptOrigin.y; + pt = pt + GetVisibleOriginInMain(); } PRectangle rc = ct.CallTipStart(sel.MainCaret(), pt, vs.lineHeight, |