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 | 7e4bd49b1315de495ad37ed7d19897abdcf44b94 (patch) | |
| tree | 8737893d8ce56a276bd673d4d236ed2ab66f3b9a /src/ScintillaBase.cxx | |
| parent | 0bc5b663b3166f562053413ce9381ad481e68a99 (diff) | |
| download | scintilla-mirror-7e4bd49b1315de495ad37ed7d19897abdcf44b94.tar.gz | |
Backport: Add some operators to Point to simplify client code.
Backport of changeset 7321:d488340e94c0.
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 c327206d8..9e4c3d4a8 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -275,9 +275,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(); @@ -462,9 +460,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, |
