From d597bb77b271a0e9f2c3f4789517435f6b63f170 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 12 Jan 2018 20:25:56 +0100 Subject: More loplugin:cstylecast: dbaccess auto-rewrite with "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I96df8923f7791288bbd350d75582a9220006ece6 --- dbaccess/source/ui/querydesign/ConnectionLine.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dbaccess/source/ui/querydesign/ConnectionLine.cxx') diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx index 2809c4d761e1..9c276b804bec 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx @@ -91,10 +91,10 @@ namespace if( nEntryPos >= 0 ) { _rNewConPos.Y() += nEntryPos; - _rNewConPos.Y() += (long)( 0.5 * nRowHeight ); + _rNewConPos.Y() += static_cast( 0.5 * nRowHeight ); } else - _rNewConPos.Y() -= (long)( 0.5 * nRowHeight ); + _rNewConPos.Y() -= static_cast( 0.5 * nRowHeight ); long nListBoxBottom = _pWin->GetPosPixel().Y() + pListBox->GetPosPixel().Y() @@ -221,8 +221,8 @@ bool OConnectionLine::RecalcLine() Point aSourceCenter( 0, 0 ); Point aDestCenter( 0, 0 ); - aSourceCenter.X() = pSourceWin->GetPosPixel().X() + (long)( 0.5*pSourceWin->GetSizePixel().Width() ); - aDestCenter.X() = pDestWin->GetPosPixel().X() + (long)( 0.5*pDestWin->GetSizePixel().Width() ); + aSourceCenter.X() = pSourceWin->GetPosPixel().X() + static_cast( 0.5*pSourceWin->GetSizePixel().Width() ); + aDestCenter.X() = pDestWin->GetPosPixel().X() + static_cast( 0.5*pDestWin->GetSizePixel().Width() ); const OTableWindow* pFirstWin = pDestWin; const OTableWindow* pSecondWin = pSourceWin; @@ -296,7 +296,7 @@ double dist_Euklid(const Point &p1, const Point& p2,const Point& pM, Point& q) { Point v(p2 - p1); Point w(pM - p1); - double a = sqrt((double)(v.X()*v.X() + v.Y()*v.Y())); + double a = sqrt(static_cast(v.X()*v.X() + v.Y()*v.Y())); double l = (v.X() * w.Y() - v.Y() * w.X()) / a; double a2 = w.X()*v.X()+w.Y()*v.Y(); a = a2 / (a * a); -- cgit