diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-03 09:59:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-04 00:51:57 +0000 |
commit | c6223049651d6607101ef04271773e478a429c8a (patch) | |
tree | f2bfb8c976896009409ae47780c324d3a9b51c77 /starmath | |
parent | 242ed97d9a74a08363e1306452bba20f06d673e4 (diff) |
V813: Decreased performance
Change-Id: Ica2563d9e8da15e19eb38246d4de54a1fcb75655
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/caret.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/starmath/inc/caret.hxx b/starmath/inc/caret.hxx index 2b951b46e409..762df16364e6 100644 --- a/starmath/inc/caret.hxx +++ b/starmath/inc/caret.hxx @@ -61,13 +61,13 @@ public: long GetTop() const {return _top;} long GetLeft() const {return _left;} long GetHeight() const {return _height;} - long SquaredDistanceX(SmCaretLine line) const{ + long SquaredDistanceX(const SmCaretLine& line) const{ return (GetLeft() - line.GetLeft()) * (GetLeft() - line.GetLeft()); } long SquaredDistanceX(Point pos) const{ return (GetLeft() - pos.X()) * (GetLeft() - pos.X()); } - long SquaredDistanceY(SmCaretLine line) const{ + long SquaredDistanceY(const SmCaretLine& line) const{ long d = GetTop() - line.GetTop(); if(d < 0) d = (d * -1) - GetHeight(); |