summaryrefslogtreecommitdiff
path: root/starmath/source/cursor.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-28 10:01:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-28 13:47:28 +0200
commite75a545f2869a4406bb434c356d481745f000271 (patch)
tree5f7b64b1c21096a98c18c47e4df855a58572be8a /starmath/source/cursor.cxx
parentc1e31ee0433232104c73cfa56e24e056833213dc (diff)
loplugin:constmethod in sdext..starmath
Change-Id: Ib1b60382c9ec62f35f0f232c3f2c2d5664ea669e Reviewed-on: https://gerrit.libreoffice.org/79779 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath/source/cursor.cxx')
-rw-r--r--starmath/source/cursor.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index b6575b8655b3..c7a1ba31e90e 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -40,7 +40,7 @@ void SmCursor::Move(OutputDevice* pDev, SmMovementDirection direction, bool bMov
best_line, //Best approximated line found so far
curr_line; //Current line
long dbp_sq = 0; //Distance squared to best line
- for(auto &pEntry : *mpGraph)
+ for(const auto &pEntry : *mpGraph)
{
//Reject it if it's the current position
if(pEntry->CaretPos == mpPosition->CaretPos) continue;
@@ -84,7 +84,7 @@ void SmCursor::MoveTo(OutputDevice* pDev, const Point& pos, bool bMoveAnchor)
SmCaretPosGraphEntry* NewPos = nullptr;
long dp_sq = 0, //Distance to current line squared
dbp_sq = 1; //Distance to best line squared
- for(auto &pEntry : *mpGraph)
+ for(const auto &pEntry : *mpGraph)
{
OSL_ENSURE(pEntry->CaretPos.IsValid(), "The caret position graph may not have invalid positions!");
//Compute current line