summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-17 13:14:50 +0200
committerNoel Grandin <noel@peralex.com>2016-02-23 08:08:56 +0200
commitc45d3badc96481db093560b94d8bf51ead6bd17c (patch)
tree4bb6c9220678a12b327e46ca2acd01e77fc8e2c4 /tools
parent003d0ccf902d2449320dd24119564565a384f365 (diff)
new loplugin: commaoperator
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/poly.cxx15
-rw-r--r--tools/source/memtools/mempool.cxx3
-rw-r--r--tools/source/stream/stream.cxx5
3 files changed, 17 insertions, 6 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 4bfec2ec356f..52c4c5c4513c 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -768,8 +768,12 @@ Polygon::Polygon( const Point& rBezPt1, const Point& rCtrlPt1,
{
Point& rPt = mpImplPolygon->mpPointAry[ i ];
- fK_2 = fK_1, fK_3 = ( fK_2 *= fK_1 ), fK_3 *= fK_1;
- fK1_2 = fK1_1, fK1_3 = ( fK1_2 *= fK1_1 ), fK1_3 *= fK1_1;
+ fK_2 = fK_1;
+ fK_3 = ( fK_2 *= fK_1 );
+ fK_3 *= fK_1;
+ fK1_2 = fK1_1;
+ fK1_3 = ( fK1_2 *= fK1_1 );
+ fK1_3 *= fK1_1;
double fK12 = fK_1 * fK1_2;
double fK21 = fK_2 * fK1_1;
@@ -1129,7 +1133,7 @@ private:
public:
explicit Vector2D( const Point& rPair ) : mfX( rPair.A() ), mfY( rPair.B() ) {};
double GetLength() const { return hypot( mfX, mfY ); }
- Vector2D& operator-=( const Vector2D& rVec ) { mfX -= rVec.mfX, mfY -= rVec.mfY; return *this; }
+ Vector2D& operator-=( const Vector2D& rVec ) { mfX -= rVec.mfX; mfY -= rVec.mfY; return *this; }
double Scalar( const Vector2D& rVec ) const { return mfX * rVec.mfX + mfY * rVec.mfY ; }
Vector2D& Normalize();
bool IsPositive( Vector2D& rVec ) const { return ( mfX * rVec.mfY - mfY * rVec.mfX ) >= 0.0; }
@@ -1140,7 +1144,10 @@ Vector2D& Vector2D::Normalize()
double fLen = Scalar( *this );
if( ( fLen != 0.0 ) && ( fLen != 1.0 ) && ( ( fLen = sqrt( fLen ) ) != 0.0 ) )
- mfX /= fLen, mfY /= fLen;
+ {
+ mfX /= fLen;
+ mfY /= fLen;
+ }
return *this;
}
diff --git a/tools/source/memtools/mempool.cxx b/tools/source/memtools/mempool.cxx
index d8e18e3d37b0..7c1c08002b8a 100644
--- a/tools/source/memtools/mempool.cxx
+++ b/tools/source/memtools/mempool.cxx
@@ -35,7 +35,8 @@ FixedMemPool::FixedMemPool(char const * pTypeName, sal_uInt16 nTypeSize)
FixedMemPool::~FixedMemPool()
{
SAL_INFO("tools.memtools","FixedMemPool::dtor(\"" << m_pTypeName << "\"): " << m_pImpl);
- rtl_cache_destroy (reinterpret_cast<rtl_cache_type*>(m_pImpl)), m_pImpl = nullptr;
+ rtl_cache_destroy (reinterpret_cast<rtl_cache_type*>(m_pImpl));
+ m_pImpl = nullptr;
}
void* FixedMemPool::Alloc()
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 69e908db81fb..b3067242b93c 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -690,7 +690,10 @@ OString read_zeroTerminated_uInt8s_ToOString(SvStream& rStream)
sal_Size nReallyRead = nLen;
const sal_Char* pPtr = buf;
while (nLen && *pPtr)
- ++pPtr, --nLen;
+ {
+ ++pPtr;
+ --nLen;
+ }
bEnd = ( nReallyRead < sizeof(buf)-1 ) // read less than attempted to read
|| ( ( nLen > 0 ) // OR it is inside the block we read