summaryrefslogtreecommitdiff
path: root/starmath/inc/caret.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-03 09:59:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-04 00:51:57 +0000
commitc6223049651d6607101ef04271773e478a429c8a (patch)
treef2bfb8c976896009409ae47780c324d3a9b51c77 /starmath/inc/caret.hxx
parent242ed97d9a74a08363e1306452bba20f06d673e4 (diff)
V813: Decreased performance
Change-Id: Ica2563d9e8da15e19eb38246d4de54a1fcb75655
Diffstat (limited to 'starmath/inc/caret.hxx')
-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 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();