diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-14 17:17:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-15 08:42:12 +0200 |
commit | 45c2eb2eced00c51198ea2e4e09a8c06d0a81305 (patch) | |
tree | b408e57f21e4007ea0397b6bbbaf30a597aa20cb /sw/source/filter/inc | |
parent | 92f9fcc99d103a572d42b00a0227e3d8d8303be6 (diff) |
loplugin:useuniqueptr in RedlineStack
Change-Id: I8e4f3599d30f94cfaa418f0adb35cf9fba97ff53
Reviewed-on: https://gerrit.libreoffice.org/59032
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/inc')
-rw-r--r-- | sw/source/filter/inc/msfilter.hxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx index 9cd6dec4455f..4babe2e56c95 100644 --- a/sw/source/filter/inc/msfilter.hxx +++ b/sw/source/filter/inc/msfilter.hxx @@ -292,7 +292,7 @@ namespace sw class RedlineStack { private: - std::vector<SwFltStackEntry *> maStack; + std::vector<std::unique_ptr<SwFltStackEntry>> maStack; SwDoc &mrDoc; RedlineStack(RedlineStack const&) = delete; @@ -315,7 +315,7 @@ namespace sw SwDoc &mrDoc; public: explicit SetInDocAndDelete(SwDoc &rDoc) : mrDoc(rDoc) {} - void operator()(SwFltStackEntry *pEntry); + void operator()(std::unique_ptr<SwFltStackEntry> & pEntry); private: SetInDocAndDelete& operator=(const SetInDocAndDelete&) = delete; }; @@ -326,7 +326,7 @@ namespace sw const SwPosition &mrPos; public: explicit SetEndIfOpen(const SwPosition &rPos) : mrPos(rPos) {} - void operator()(SwFltStackEntry *pEntry) const + void operator()(std::unique_ptr<SwFltStackEntry> & pEntry) const { if (pEntry->bOpen) pEntry->SetEndPos(mrPos); @@ -338,7 +338,7 @@ namespace sw class CompareRedlines { public: - bool operator()(const SwFltStackEntry *pOneE, const SwFltStackEntry *pTwoE) + bool operator()(const std::unique_ptr<SwFltStackEntry> & pOneE, const std::unique_ptr<SwFltStackEntry> & pTwoE) const; }; |