Kaydet (Commit) b6056eab authored tarafından Takeshi Abe's avatar Takeshi Abe

Passing its const ref is sufficient

Change-Id: I85db4fcc3698d02ac6a7660042152092e6eeb99e
Reviewed-on: https://gerrit.libreoffice.org/25752Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMark Page <aptitude@btconnect.com>
Reviewed-by: 's avatarTakeshi Abe <tabe@fixedpoint.jp>
üst 242b51c9
...@@ -68,7 +68,7 @@ public: ...@@ -68,7 +68,7 @@ public:
long SquaredDistanceX(const SmCaretLine& line) const{ long SquaredDistanceX(const SmCaretLine& line) const{
return (GetLeft() - line.GetLeft()) * (GetLeft() - line.GetLeft()); 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()); return (GetLeft() - pos.X()) * (GetLeft() - pos.X());
} }
long SquaredDistanceY(const SmCaretLine& line) const{ long SquaredDistanceY(const SmCaretLine& line) const{
...@@ -81,7 +81,7 @@ public: ...@@ -81,7 +81,7 @@ public:
return 0; return 0;
return d * d; return d * d;
} }
long SquaredDistanceY(Point pos) const{ long SquaredDistanceY(const Point &pos) const{
long d = GetTop() - pos.Y(); long d = GetTop() - pos.Y();
if(d < 0) if(d < 0)
d = (d * -1) - GetHeight(); d = (d * -1) - GetHeight();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment