summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-06-01 16:48:05 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2016-06-02 05:15:20 +0000
commitb6056eabfa8583d687165e3f9656cd322230829c (patch)
tree78a5be5c51a395e600f8a681e759d856e199b211 /starmath
parent242b51c9f6ba0c580b73b713cbaacc4fb922c28e (diff)
Passing its const ref is sufficient
Change-Id: I85db4fcc3698d02ac6a7660042152092e6eeb99e Reviewed-on: https://gerrit.libreoffice.org/25752 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/inc/caret.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/starmath/inc/caret.hxx b/starmath/inc/caret.hxx
index de13ac97a32f..c1ef793a9242 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();