diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:13:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:13:55 +0100 |
commit | c049c76fc521f2b55b39a6e9eb0f0092bcf6ef77 (patch) | |
tree | 2bc2c059a6f6a175a0c0e5321887adc077fef419 /include/svx/svdtrans.hxx | |
parent | 0ae2d98d1f6d29c80bd1ee830db4c333e4ee1e1d (diff) |
More loplugin:cstylecast: svx
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: I100e6c14cbf1d780f0e5ebca6b0c9e71ce1caaf7
Diffstat (limited to 'include/svx/svdtrans.hxx')
-rw-r--r-- | include/svx/svdtrans.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/svx/svdtrans.hxx b/include/svx/svdtrans.hxx index 6ad879d3a822..f3e25203ff2e 100644 --- a/include/svx/svdtrans.hxx +++ b/include/svx/svdtrans.hxx @@ -51,7 +51,7 @@ class XPolygon; class XPolyPolygon; namespace svx { - inline long Round(double a) { return a>0.0 ? (long)(a+0.5) : -(long)((-a)+0.5); } + inline long Round(double a) { return a>0.0 ? static_cast<long>(a+0.5) : -static_cast<long>((-a)+0.5); } } inline void MoveRect(tools::Rectangle& rRect, const Size& S) { rRect.Move(S.Width(),S.Height()); } @@ -145,11 +145,11 @@ inline double GetCrookAngle(Point& rPnt, const Point& rCenter, const Point& rRad double nAngle; if (bVertical) { long dy=rPnt.Y()-rCenter.Y(); - nAngle=(double)dy/(double)rRad.Y(); + nAngle=static_cast<double>(dy)/static_cast<double>(rRad.Y()); rPnt.Y()=rCenter.Y(); } else { long dx=rCenter.X()-rPnt.X(); - nAngle=(double)dx/(double)rRad.X(); + nAngle=static_cast<double>(dx)/static_cast<double>(rRad.X()); rPnt.X()=rCenter.X(); } return nAngle; |