diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-10-09 10:28:48 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-10-09 14:47:17 +0200 |
commit | 7ceee0f1ec0e349d0df4980d7fdedbd13c7917c5 (patch) | |
tree | 616ab419fe0f01e94740de7faacb393775420589 /basegfx | |
parent | 664db0d945fbb23e115eeea8377e3a4e88541da1 (diff) |
Extend loplugin:redundantinline to catch inline functions w/o external linkage
...where "inline" (in its meaning of "this function can be defined in multiple
translation units") thus doesn't make much sense. (As discussed in
compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions
in include files for now.)
All the rewriting has been done automatically by the plugin, except for one
instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus
some subsequent solenv/clang-format/reformat-formatted-files.
Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224
Reviewed-on: https://gerrit.libreoffice.org/61573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/color/bcolortools.cxx | 2 | ||||
-rw-r--r-- | basegfx/source/curve/b2dcubicbezier.cxx | 2 | ||||
-rw-r--r-- | basegfx/source/polygon/b2dpolygontools.cxx | 2 | ||||
-rw-r--r-- | basegfx/source/polygon/b3dpolypolygontools.cxx | 2 | ||||
-rw-r--r-- | basegfx/source/range/b2drangeclipper.cxx | 14 | ||||
-rw-r--r-- | basegfx/source/tools/tools.cxx | 2 | ||||
-rw-r--r-- | basegfx/test/boxclipper.cxx | 2 |
7 files changed, 13 insertions, 13 deletions
diff --git a/basegfx/source/color/bcolortools.cxx b/basegfx/source/color/bcolortools.cxx index 7b5bf9cae140..42e326af11a4 100644 --- a/basegfx/source/color/bcolortools.cxx +++ b/basegfx/source/color/bcolortools.cxx @@ -59,7 +59,7 @@ namespace basegfx { namespace utils return BColor(h,s,l); } - static inline double hsl2rgbHelper( double nValue1, double nValue2, double nHue ) + static double hsl2rgbHelper( double nValue1, double nValue2, double nHue ) { // clamp hue to [0,360] nHue = fmod( nHue, 360.0 ); diff --git a/basegfx/source/curve/b2dcubicbezier.cxx b/basegfx/source/curve/b2dcubicbezier.cxx index c0adc5a09b37..9584eeded3c0 100644 --- a/basegfx/source/curve/b2dcubicbezier.cxx +++ b/basegfx/source/curve/b2dcubicbezier.cxx @@ -907,7 +907,7 @@ namespace basegfx namespace { - inline void impCheckExtremumResult(double fCandidate, std::vector< double >& rResult) + void impCheckExtremumResult(double fCandidate, std::vector< double >& rResult) { // check for range ]0.0 .. 1.0[ with excluding 1.0 and 0.0 clearly // by using the equalZero test, NOT ::more or ::less which will use the diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx index 27bfa56d8ced..20b193d099bc 100644 --- a/basegfx/source/polygon/b2dpolygontools.cxx +++ b/basegfx/source/polygon/b2dpolygontools.cxx @@ -2161,7 +2161,7 @@ namespace basegfx namespace { /// return 0 for input of 0, -1 for negative and 1 for positive input - inline int lcl_sgn( const double n ) + int lcl_sgn( const double n ) { return n == 0.0 ? 0 : 1 - 2*int(rtl::math::isSignBitSet(n)); } diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx index f3975a7a51c0..3b9b15b93890 100644 --- a/basegfx/source/polygon/b3dpolypolygontools.cxx +++ b/basegfx/source/polygon/b3dpolypolygontools.cxx @@ -223,7 +223,7 @@ namespace basegfx // helper for getting the 3D Point from given cartesian coordinates. fHor is defined from // [F_PI2 .. -F_PI2], fVer from [0.0 .. F_2PI] - static inline B3DPoint getPointFromCartesian(double fHor, double fVer) + static B3DPoint getPointFromCartesian(double fHor, double fVer) { const double fCosVer(cos(fVer)); return B3DPoint(fCosVer * cos(fHor), sin(fVer), fCosVer * -sin(fHor)); diff --git a/basegfx/source/range/b2drangeclipper.cxx b/basegfx/source/range/b2drangeclipper.cxx index f98b6bdc6830..bc25fa474682 100644 --- a/basegfx/source/range/b2drangeclipper.cxx +++ b/basegfx/source/range/b2drangeclipper.cxx @@ -680,7 +680,7 @@ namespace basegfx aNewEdges ); } - inline bool isSameRect(ActiveEdge const & rEdge, + bool isSameRect(ActiveEdge const & rEdge, basegfx::B2DRange const & rRect) { return &rEdge.getRect() == &rRect; @@ -689,12 +689,12 @@ namespace basegfx // wow what a hack. necessary because stl's list::erase does // not eat reverse_iterator template<typename Cont, typename Iter> Iter eraseFromList(Cont&, const Iter&); - template<> inline ListOfEdges::iterator eraseFromList( + template<> ListOfEdges::iterator eraseFromList( ListOfEdges& rList, const ListOfEdges::iterator& aIter) { return rList.erase(aIter); } - template<> inline ListOfEdges::reverse_iterator eraseFromList( + template<> ListOfEdges::reverse_iterator eraseFromList( ListOfEdges& rList, const ListOfEdges::reverse_iterator& aIter) { return ListOfEdges::reverse_iterator( @@ -702,7 +702,7 @@ namespace basegfx } template<int bPerformErase, - typename Iterator> inline void processActiveEdges( + typename Iterator> void processActiveEdges( Iterator first, Iterator last, ListOfEdges& rActiveEdgeList, @@ -761,7 +761,7 @@ namespace basegfx } } - template<int bPerformErase> inline void processActiveEdgesTopDown( + template<int bPerformErase> void processActiveEdgesTopDown( SweepLineEvent& rCurrEvent, ListOfEdges& rActiveEdgeList, VectorOfPolygons& rPolygonPool, @@ -776,7 +776,7 @@ namespace basegfx rRes); } - template<int bPerformErase> inline void processActiveEdgesBottomUp( + template<int bPerformErase> void processActiveEdgesBottomUp( SweepLineEvent& rCurrEvent, ListOfEdges& rActiveEdgeList, VectorOfPolygons& rPolygonPool, @@ -824,7 +824,7 @@ namespace basegfx rCurrEvent, rActiveEdgeList, rPolygonPool, rRes); } - inline void handleSweepLineEvent( SweepLineEvent& rCurrEvent, + void handleSweepLineEvent( SweepLineEvent& rCurrEvent, ListOfEdges& rActiveEdgeList, VectorOfPolygons& rPolygonPool, B2DPolyPolygon& rRes) diff --git a/basegfx/source/tools/tools.cxx b/basegfx/source/tools/tools.cxx index 16feb0c7ef16..74e1ad785612 100644 --- a/basegfx/source/tools/tools.cxx +++ b/basegfx/source/tools/tools.cxx @@ -28,7 +28,7 @@ namespace basegfx { namespace { - inline double distance( const double& nX, + double distance( const double& nX, const double& nY, const ::basegfx::B2DVector& rNormal, const double& nC ) diff --git a/basegfx/test/boxclipper.cxx b/basegfx/test/boxclipper.cxx index 49015b66deef..abf966b1f8b4 100644 --- a/basegfx/test/boxclipper.cxx +++ b/basegfx/test/boxclipper.cxx @@ -49,7 +49,7 @@ double getRandomOrdinal( const std::size_t n ) return comphelper::rng::uniform_size_distribution(0, n-1); } -static inline bool compare(const B2DPoint& left, const B2DPoint& right) +static bool compare(const B2DPoint& left, const B2DPoint& right) { return left.getX()<right.getX() || (rtl::math::approxEqual(left.getX(),right.getX()) && left.getY()<right.getY()); |