summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compilerplugins/clang/test/unnecessaryoverride-dtor.cxx4
-rw-r--r--compilerplugins/clang/unnecessaryoverride.cxx6
-rw-r--r--slideshow/source/engine/opengl/TransitionImpl.hxx27
-rw-r--r--sw/inc/swcrsr.hxx8
-rw-r--r--sw/source/core/layout/layhelp.hxx12
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx14
6 files changed, 49 insertions, 22 deletions
diff --git a/compilerplugins/clang/test/unnecessaryoverride-dtor.cxx b/compilerplugins/clang/test/unnecessaryoverride-dtor.cxx
index b54957be2d7a..8ed472749105 100644
--- a/compilerplugins/clang/test/unnecessaryoverride-dtor.cxx
+++ b/compilerplugins/clang/test/unnecessaryoverride-dtor.cxx
@@ -78,10 +78,10 @@ struct DefaultDerived1: VirtualBase {
};
struct DefaultDerived2: VirtualBase {
- ~DefaultDerived2() override; // expected-note {{declared here [loplugin:unnecessaryoverride]}}
+ ~DefaultDerived2() override;
};
-DefaultDerived2::~DefaultDerived2() = default; // expected-error {{unnecessary user-declared destructor [loplugin:unnecessaryoverride]}}
+DefaultDerived2::~DefaultDerived2() = default;
struct EmptyDerived1: VirtualBase {
~EmptyDerived1() override {}; // expected-error {{unnecessary user-declared destructor [loplugin:unnecessaryoverride]}}
diff --git a/compilerplugins/clang/unnecessaryoverride.cxx b/compilerplugins/clang/unnecessaryoverride.cxx
index 6523170105a2..0641339d4e6f 100644
--- a/compilerplugins/clang/unnecessaryoverride.cxx
+++ b/compilerplugins/clang/unnecessaryoverride.cxx
@@ -200,7 +200,11 @@ bool UnnecessaryOverride::VisitCXXMethodDecl(const CXXMethodDecl* methodDecl)
{
return true;
}
- if (!methodDecl->isExplicitlyDefaulted()) {
+ if (methodDecl->isExplicitlyDefaulted()) {
+ if (methodDecl->getPreviousDecl() != nullptr) {
+ return true;
+ }
+ } else {
if (!methodDecl->doesThisDeclarationHaveABody()
|| methodDecl->isLateTemplateParsed())
{
diff --git a/slideshow/source/engine/opengl/TransitionImpl.hxx b/slideshow/source/engine/opengl/TransitionImpl.hxx
index 9a869203cb56..9ca35c1e8f6d 100644
--- a/slideshow/source/engine/opengl/TransitionImpl.hxx
+++ b/slideshow/source/engine/opengl/TransitionImpl.hxx
@@ -71,18 +71,14 @@ typedef std::vector<std::shared_ptr<Operation> > Operations_t;
class TransitionScene
{
public:
- TransitionScene(
+ inline TransitionScene(
Primitives_t&& rLeavingSlidePrimitives,
Primitives_t&& rEnteringSlidePrimitives,
Operations_t&& rOverallOperations = Operations_t(),
SceneObjects_t&& rSceneObjects = SceneObjects_t()
- )
- : maLeavingSlidePrimitives(std::move(rLeavingSlidePrimitives))
- , maEnteringSlidePrimitives(std::move(rEnteringSlidePrimitives))
- , maOverallOperations(std::move(rOverallOperations))
- , maSceneObjects(std::move(rSceneObjects))
- {
- }
+ );
+
+ inline ~TransitionScene();
TransitionScene(TransitionScene const& rOther);
TransitionScene& operator=(const TransitionScene& rOther);
@@ -377,6 +373,21 @@ private:
std::vector<Vertex> Vertices;
};
+TransitionScene::TransitionScene(
+ Primitives_t&& rLeavingSlidePrimitives,
+ Primitives_t&& rEnteringSlidePrimitives,
+ Operations_t&& rOverallOperations,
+ SceneObjects_t&& rSceneObjects
+)
+ : maLeavingSlidePrimitives(std::move(rLeavingSlidePrimitives))
+ , maEnteringSlidePrimitives(std::move(rEnteringSlidePrimitives))
+ , maOverallOperations(std::move(rOverallOperations))
+ , maSceneObjects(std::move(rSceneObjects))
+{
+}
+
+TransitionScene::~TransitionScene() = default;
+
#endif // INCLUDED_SLIDESHOW_TRANSITION_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index e8fa059ee5ff..cd2b4ac74ed7 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -84,7 +84,7 @@ protected:
void SaveState();
void RestoreState();
- const SwCursor_SavePos* GetSavePos() const { return m_vSavePos.empty() ? nullptr : &m_vSavePos.back(); }
+ inline const SwCursor_SavePos* GetSavePos() const;
virtual const SwContentFrame* DoSetBidiLevelLeftRight(
bool & io_rbLeft, bool bVisualAllowed, bool bInsertCursor);
@@ -96,7 +96,7 @@ public:
SwCursor( const SwPosition &rPos, SwPaM* pRing );
virtual ~SwCursor() override;
- SwCursor & operator =(SwCursor const &) = default;
+ inline SwCursor & operator =(SwCursor const &);
/// this takes a second parameter, which indicates the Ring that
/// the new cursor should be part of (may be null)
@@ -310,6 +310,10 @@ public:
const SwTableCursor* GetPrev() const { return dynamic_cast<SwTableCursor const *>(GetPrevInRing()); }
};
+const SwCursor_SavePos* SwCursor::GetSavePos() const { return m_vSavePos.empty() ? nullptr : &m_vSavePos.back(); }
+
+SwCursor & SwCursor::operator =(SwCursor const &) = default;
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index fef26842d9cc..106fe4428013 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -63,7 +63,7 @@ class SwLayCacheImpl
void Insert( sal_uInt16 nType, sal_uLong nIndex, sal_Int32 nOffset );
public:
- SwLayCacheImpl() : m_bUseFlyCache(false) {}
+ inline SwLayCacheImpl();
size_t size() const { return mIndices.size(); }
@@ -73,8 +73,8 @@ public:
sal_Int32 GetBreakOfst( size_t nIdx ) const { return m_aOffset[ nIdx ]; }
sal_uInt16 GetBreakType( size_t nIdx ) const { return m_aType[ nIdx ]; }
- size_t GetFlyCount() const { return m_FlyCache.size(); }
- SwFlyCache& GetFlyCache( size_t nIdx ) { return m_FlyCache[ nIdx ]; }
+ inline size_t GetFlyCount() const;
+ inline SwFlyCache& GetFlyCache( size_t nIdx );
bool IsUseFlyCache() const { return m_bUseFlyCache; }
};
@@ -212,6 +212,12 @@ public:
SwRect( nXL, nYL, nWL, nHL ), nOrdNum( nO ), nPageNum( nP ){}
};
+SwLayCacheImpl::SwLayCacheImpl() : m_bUseFlyCache(false) {}
+
+size_t SwLayCacheImpl::GetFlyCount() const { return m_FlyCache.size(); }
+
+SwFlyCache& SwLayCacheImpl::GetFlyCache( size_t nIdx ) { return m_FlyCache[ nIdx ]; }
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index b23a0b42416d..7d58fe653716 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -253,12 +253,7 @@ struct TextAppendContext
*/
std::vector<AnchoredObjectInfo> m_aAnchoredObjects;
- TextAppendContext(const css::uno::Reference<css::text::XTextAppend>& xAppend, const css::uno::Reference<css::text::XTextCursor>& xCur)
- : xTextAppend(xAppend)
- {
- xCursor.set(xCur, css::uno::UNO_QUERY);
- xInsertPosition = xCursor;
- }
+ inline TextAppendContext(const css::uno::Reference<css::text::XTextAppend>& xAppend, const css::uno::Reference<css::text::XTextCursor>& xCur);
};
struct AnchoredContext
@@ -1172,6 +1167,13 @@ private:
std::unordered_map<OUString, CommentProperties> m_aCommentProps;
};
+TextAppendContext::TextAppendContext(const css::uno::Reference<css::text::XTextAppend>& xAppend, const css::uno::Reference<css::text::XTextCursor>& xCur)
+ : xTextAppend(xAppend)
+{
+ xCursor.set(xCur, css::uno::UNO_QUERY);
+ xInsertPosition = xCursor;
+}
+
} //namespace writerfilter::dmapper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */