From 83fd71e041f2c0520c4cc213e238c7f3c674c5a3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 24 Oct 2017 14:07:42 +0200 Subject: loplugin:constmethod in tools,sax,UnoControls Change-Id: Ie05e44e2a4019e2549843961ebfa04fef7b7aeb4 Reviewed-on: https://gerrit.libreoffice.org/43767 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'svx') diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index fb34312cae6b..dc5693d0ff71 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -138,7 +138,7 @@ double GetLength( const tools::Polygon& rPolygon ) { sal_uInt16 nCount = rPolygon.GetSize(); while( --nCount ) - fLength += const_cast(rPolygon).CalcDistance( nCount, nCount - 1 ); + fLength += rPolygon.CalcDistance( nCount, nCount - 1 ); } return fLength; } @@ -538,7 +538,7 @@ void CalcDistances( const tools::Polygon& rPoly, std::vector< double >& rDistanc { for ( i = 0; i < nCount; i++ ) { - double fDistance = i ? const_cast(rPoly).CalcDistance( i, i - 1 ) : 0.0; + double fDistance = i ? rPoly.CalcDistance( i, i - 1 ) : 0.0; rDistances.push_back( fDistance ); } std::partial_sum( rDistances.begin(), rDistances.end(), rDistances.begin() ); -- cgit