diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-04 11:20:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-12-05 07:49:30 +0100 |
commit | e4472d3c139294499f4c0caeebd9d4e995958eb0 (patch) | |
tree | 3e62a6530f8b758dddab18981ee38cc76ecaef9e /slideshow | |
parent | 126e5a4d5b1d6c7ba5b313786793a38f99488b33 (diff) |
loplugin:unnecessaryparen include more assignments
Change-Id: I9fb8366634b31230b732dd38a98f800075529714
Reviewed-on: https://gerrit.libreoffice.org/64510
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'slideshow')
10 files changed, 23 insertions, 23 deletions
diff --git a/slideshow/source/engine/opengl/TransitionerImpl.cxx b/slideshow/source/engine/opengl/TransitionerImpl.cxx index 6fe8c08772ee..f8af810f813b 100644 --- a/slideshow/source/engine/opengl/TransitionerImpl.cxx +++ b/slideshow/source/engine/opengl/TransitionerImpl.cxx @@ -1068,7 +1068,7 @@ void SAL_CALL OGLTransitionerImpl::update( double nTime ) SAL_INFO("slideshow.opengl", "update time: " << nTime); SAL_INFO("slideshow.opengl", "update took: " << std::chrono::duration_cast<std::chrono::milliseconds>(m_UpdateEndTime - m_UpdateStartTime).count()); - m_TotalUpdateDuration += (m_UpdateEndTime - m_UpdateStartTime); + m_TotalUpdateDuration += m_UpdateEndTime - m_UpdateStartTime; #endif } diff --git a/slideshow/source/engine/rehearsetimingsactivity.cxx b/slideshow/source/engine/rehearsetimingsactivity.cxx index ec1370f08784..6285f73557e7 100644 --- a/slideshow/source/engine/rehearsetimingsactivity.cxx +++ b/slideshow/source/engine/rehearsetimingsactivity.cxx @@ -415,7 +415,7 @@ void RehearseTimingsActivity::paint( cppcanvas::CanvasSharedPtr const & canvas ) const sal_Int32 nTimeSecs = static_cast<sal_Int32>(maElapsedTime.getElapsedTime()); OUStringBuffer buf; - sal_Int32 n = (nTimeSecs / 3600); + sal_Int32 n = nTimeSecs / 3600; if (n < 10) buf.append( '0' ); buf.append( n ); diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx index e829c9d4a954..d556edd24aaf 100644 --- a/slideshow/source/engine/shapes/shapeimporter.cxx +++ b/slideshow/source/engine/shapes/shapeimporter.cxx @@ -172,8 +172,8 @@ bool ShapeOfGroup::isContentChanged() const basegfx::B2DRectangle ShapeOfGroup::getBounds() const { basegfx::B2DRectangle const groupPosSize( mpGroupShape->getBounds() ); - double const posX = (groupPosSize.getMinX() + maPosOffset.getX()); - double const posY = (groupPosSize.getMinY() + maPosOffset.getY()); + double const posX = groupPosSize.getMinX() + maPosOffset.getX(); + double const posY = groupPosSize.getMinY() + maPosOffset.getY(); return basegfx::B2DRectangle( posX, posY, posX + mnWidth, posY + mnHeight ); } diff --git a/slideshow/source/engine/transitions/checkerboardwipe.cxx b/slideshow/source/engine/transitions/checkerboardwipe.cxx index 2f09145af17a..8512e398efa7 100644 --- a/slideshow/source/engine/transitions/checkerboardwipe.cxx +++ b/slideshow/source/engine/transitions/checkerboardwipe.cxx @@ -27,7 +27,7 @@ namespace internal { ::basegfx::B2DPolyPolygon CheckerBoardWipe::operator () ( double t ) { - const double d = (1.0 / m_unitsPerEdge); + const double d = 1.0 / m_unitsPerEdge; ::basegfx::B2DHomMatrix aTransform; aTransform.scale( ::basegfx::pruneScaleValue( d * 2.0 * t ), ::basegfx::pruneScaleValue( d ) ); diff --git a/slideshow/source/engine/transitions/figurewipe.cxx b/slideshow/source/engine/transitions/figurewipe.cxx index a2f3d525c32a..1761fdc1a4e4 100644 --- a/slideshow/source/engine/transitions/figurewipe.cxx +++ b/slideshow/source/engine/transitions/figurewipe.cxx @@ -93,11 +93,11 @@ FigureWipe * FigureWipe::createHexagonWipe() FigureWipe * FigureWipe::createStarWipe( sal_Int32 nPoints ) { - const double v = (M_PI / nPoints); + const double v = M_PI / nPoints; const ::basegfx::B2DPoint p_( 0.0, -M_SQRT2 ); ::basegfx::B2DPolygon figure; for ( sal_Int32 pos = 0; pos < nPoints; ++pos ) { - const double w = (pos * 2.0 * M_PI / nPoints); + const double w = pos * 2.0 * M_PI / nPoints; ::basegfx::B2DHomMatrix aTransform; ::basegfx::B2DPoint p(p_); aTransform.rotate( -w ); diff --git a/slideshow/source/engine/transitions/randomwipe.cxx b/slideshow/source/engine/transitions/randomwipe.cxx index 584c17b1c0f1..dbe78386bb6e 100644 --- a/slideshow/source/engine/transitions/randomwipe.cxx +++ b/slideshow/source/engine/transitions/randomwipe.cxx @@ -36,7 +36,7 @@ RandomWipe::RandomWipe( sal_Int32 nElements, bool randomBars ) ::basegfx::B2DHomMatrix aTransform; if (randomBars) { - double edge = (1.0 / nElements); + double edge = 1.0 / nElements; for ( sal_Int32 pos = nElements; pos--; ) m_positions[ pos ].setY( ::basegfx::pruneScaleValue( pos * edge ) ); aTransform.scale( 1.0, ::basegfx::pruneScaleValue(edge) ); @@ -45,7 +45,7 @@ RandomWipe::RandomWipe( sal_Int32 nElements, bool randomBars ) { sal_Int32 sqrtElements = static_cast<sal_Int32>( sqrt( static_cast<double>(nElements) ) ); - double edge = (1.0 / sqrtElements); + double edge = 1.0 / sqrtElements; for ( sal_Int32 pos = nElements; pos--; ) { m_positions[ pos ] = ::basegfx::B2DPoint( ::basegfx::pruneScaleValue( (pos % sqrtElements) * edge ), diff --git a/slideshow/source/engine/transitions/snakewipe.cxx b/slideshow/source/engine/transitions/snakewipe.cxx index 2fd53e121494..efa8960bbfd1 100644 --- a/slideshow/source/engine/transitions/snakewipe.cxx +++ b/slideshow/source/engine/transitions/snakewipe.cxx @@ -46,8 +46,8 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) ::basegfx::B2DPolyPolygon SnakeWipe::calcSnake( double t ) const { ::basegfx::B2DPolyPolygon res; - const double area = (t * m_sqrtElements * m_sqrtElements); - const sal_Int32 line_ = (static_cast<sal_Int32>(area) / m_sqrtElements); + const double area = t * m_sqrtElements * m_sqrtElements; + const sal_Int32 line_ = static_cast<sal_Int32>(area) / m_sqrtElements; const double line = ::basegfx::pruneScaleValue( static_cast<double>(line_) / m_sqrtElements ); const double col = ::basegfx::pruneScaleValue( @@ -102,9 +102,9 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) poly.setClosed(true); res.append(poly); } - const double a = (M_SQRT1_2 / m_sqrtElements); + const double a = M_SQRT1_2 / m_sqrtElements; const double d = std::modf(sqrtArea2, &o3tl::temporary(double())); - const double len = (t * M_SQRT2 * d); + const double len = t * M_SQRT2 * d; const double height = ::basegfx::pruneScaleValue( M_SQRT1_2 / m_sqrtElements ); poly.clear(); poly.append( ::basegfx::B2DPoint( 0.0, 0.0 ) ); @@ -146,9 +146,9 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) poly.setClosed(true); res.append(poly); } - const double a = (M_SQRT1_2 / m_sqrtElements); + const double a = M_SQRT1_2 / m_sqrtElements; const double d = std::modf(sqrtArea2, &o3tl::temporary(double())); - const double len = ((1.0 - t) * M_SQRT2 * d); + const double len = (1.0 - t) * M_SQRT2 * d; const double height = ::basegfx::pruneScaleValue( M_SQRT1_2 / m_sqrtElements ); poly.clear(); poly.append( ::basegfx::B2DPoint( 0.0, 0.0 ) ); diff --git a/slideshow/source/engine/transitions/spiralwipe.cxx b/slideshow/source/engine/transitions/spiralwipe.cxx index 6ecad1712ed4..a00c95b0984e 100644 --- a/slideshow/source/engine/transitions/spiralwipe.cxx +++ b/slideshow/source/engine/transitions/spiralwipe.cxx @@ -40,9 +40,9 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis ) ::basegfx::B2DPolyPolygon SpiralWipe::calcNegSpiral( double t ) const { - const double area = (t * m_elements); - const double e = (sqrt(area) / 2.0); - const sal_Int32 edge = (static_cast<sal_Int32>(e) * 2); + const double area = t * m_elements; + const double e = sqrt(area) / 2.0; + const sal_Int32 edge = static_cast<sal_Int32>(e) * 2; basegfx::B2DHomMatrix aTransform(basegfx::utils::createTranslateB2DHomMatrix(-0.5, -0.5)); const double edge_ = ::basegfx::pruneScaleValue( @@ -54,7 +54,7 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis ) ::basegfx::B2DPolyPolygon res(poly); if (! ::basegfx::fTools::equalZero( 1.0 - t )) { - const sal_Int32 edge1 = (edge + 1); + const sal_Int32 edge1 = edge + 1; sal_Int32 len = static_cast<sal_Int32>( (e - (edge /2)) * edge1 * 4 ); double w = M_PI_2; while (len > 0) { diff --git a/slideshow/source/engine/transitions/waterfallwipe.cxx b/slideshow/source/engine/transitions/waterfallwipe.cxx index eb0ead303c62..97f25eef1631 100644 --- a/slideshow/source/engine/transitions/waterfallwipe.cxx +++ b/slideshow/source/engine/transitions/waterfallwipe.cxx @@ -34,11 +34,11 @@ WaterfallWipe::WaterfallWipe( sal_Int32 nElements, bool flipOnYAxis ) { const sal_Int32 sqrtElements = static_cast<sal_Int32>( sqrt( static_cast<double>(nElements) ) ); - const double elementEdge = (1.0 / sqrtElements); + const double elementEdge = 1.0 / sqrtElements; m_waterfall.append( ::basegfx::B2DPoint( 0.0, -1.0 ) ); for ( sal_Int32 pos = sqrtElements; pos--; ) { - const sal_Int32 xPos = (sqrtElements - pos - 1); + const sal_Int32 xPos = sqrtElements - pos - 1; const double yPos = ::basegfx::pruneScaleValue( ((pos + 1) * elementEdge) - 1.0 ); m_waterfall.append( ::basegfx::B2DPoint( ::basegfx::pruneScaleValue( xPos * elementEdge ), diff --git a/slideshow/source/engine/transitions/zigzagwipe.cxx b/slideshow/source/engine/transitions/zigzagwipe.cxx index adfc85c1d224..e7f80e78cf01 100644 --- a/slideshow/source/engine/transitions/zigzagwipe.cxx +++ b/slideshow/source/engine/transitions/zigzagwipe.cxx @@ -32,11 +32,11 @@ namespace internal { ZigZagWipe::ZigZagWipe( sal_Int32 nZigs ) : m_zigEdge( 1.0 / nZigs ) { const double d = m_zigEdge; - const double d2 = (d / 2.0); + const double d2 = d / 2.0; m_stdZigZag.append( ::basegfx::B2DPoint( -1.0 - d, -d ) ); m_stdZigZag.append( ::basegfx::B2DPoint( -1.0 - d, 1.0 + d ) ); m_stdZigZag.append( ::basegfx::B2DPoint( -d, 1.0 + d ) ); - for ( sal_Int32 pos = (nZigs + 2); pos--; ) { + for ( sal_Int32 pos = nZigs + 2; pos--; ) { m_stdZigZag.append( ::basegfx::B2DPoint( 0.0, ((pos - 1) * d) + d2 ) ); m_stdZigZag.append( ::basegfx::B2DPoint( -d, (pos - 1) * d ) ); } |