[Libreoffice-commits] core.git: starmath/inc

Takeshi Abe tabe at fixedpoint.jp
Thu Jun 2 05:15:52 UTC 2016


 starmath/inc/caret.hxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b6056eabfa8583d687165e3f9656cd322230829c
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Jun 1 16:48:05 2016 +0900

    Passing its const ref is sufficient
    
    Change-Id: I85db4fcc3698d02ac6a7660042152092e6eeb99e
    Reviewed-on: https://gerrit.libreoffice.org/25752
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Mark Page <aptitude at btconnect.com>
    Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>

diff --git a/starmath/inc/caret.hxx b/starmath/inc/caret.hxx
index de13ac9..c1ef793 100644
--- a/starmath/inc/caret.hxx
+++ b/starmath/inc/caret.hxx
@@ -68,7 +68,7 @@ public:
     long SquaredDistanceX(const SmCaretLine& line) const{
         return (GetLeft() - line.GetLeft()) * (GetLeft() - line.GetLeft());
     }
-    long SquaredDistanceX(Point pos) const{
+    long SquaredDistanceX(const Point &pos) const{
         return (GetLeft() - pos.X()) * (GetLeft() - pos.X());
     }
     long SquaredDistanceY(const SmCaretLine& line) const{
@@ -81,7 +81,7 @@ public:
             return 0;
         return d * d;
     }
-    long SquaredDistanceY(Point pos) const{
+    long SquaredDistanceY(const Point &pos) const{
         long d = GetTop() - pos.Y();
         if(d < 0)
             d = (d * -1) - GetHeight();


More information about the Libreoffice-commits mailing list