diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-03 12:25:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-04 12:51:42 +0200 |
commit | 55f78bcb63e552559ec6a18e39ae982dd925974a (patch) | |
tree | cc0b509a5257959fbfd45febb943eb3f315a42b4 /sw/source/filter/inc | |
parent | 04c5f27e8f904f01b1dbfba2b95ed57a9e439f91 (diff) |
loplugin:useuniqueptr in SwWriteTableCols
Change-Id: Ib4c95401c3e9e60c1c909080b3381d652c862e62
Reviewed-on: https://gerrit.libreoffice.org/61342
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/wrtswtbl.hxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx index c19b6b929e90..915ad04dbe9a 100644 --- a/sw/source/filter/inc/wrtswtbl.hxx +++ b/sw/source/filter/inc/wrtswtbl.hxx @@ -200,14 +200,12 @@ inline bool SwWriteTableCol::operator<( const SwWriteTableCol& rCol ) const } struct SwWriteTableColLess { - bool operator()(SwWriteTableCol const * lhs, SwWriteTableCol const * rhs) { + bool operator()(std::unique_ptr<SwWriteTableCol> const & lhs, std::unique_ptr<SwWriteTableCol> const & rhs) { return lhs->GetPos() < rhs->GetPos(); } }; -class SwWriteTableCols : public o3tl::sorted_vector<SwWriteTableCol*, SwWriteTableColLess> { -public: - ~SwWriteTableCols() { DeleteAndDestroyAll(); } +class SwWriteTableCols : public o3tl::sorted_vector<std::unique_ptr<SwWriteTableCol>, SwWriteTableColLess> { }; class SwTable; |