diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-24 16:50:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-25 13:14:20 +0200 |
commit | 4467dc6685dbe2862da5eb54edb89c1711253812 (patch) | |
tree | fb57b72dc85ff9478622c65fa293b1af96d48adf /sc/inc | |
parent | loplugin:unusedfields (diff) | |
download | core-4467dc6685dbe2862da5eb54edb89c1711253812.tar.gz core-4467dc6685dbe2862da5eb54edb89c1711253812.zip |
loplugin:useuniqueptr in sc
Change-Id: Ia647ef2dda2dd54a4958a7dc561a0fb86abdfd86
Reviewed-on: https://gerrit.libreoffice.org/41522
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/dptabres.hxx | 4 | ||||
-rw-r--r-- | sc/inc/funcdesc.hxx | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx index 40a0d9aa0a18..c0a29c8ae52f 100644 --- a/sc/inc/dptabres.hxx +++ b/sc/inc/dptabres.hxx @@ -500,13 +500,13 @@ typedef std::vector<ScDPDataMember*> ScDPDataMembers; class ScDPResultDimension { public: - typedef std::vector<ScDPResultMember*> MemberArray; + typedef std::vector<std::unique_ptr<ScDPResultMember>> MemberArray; typedef std::map<SCROW, ScDPResultMember*> MemberHash; private: const ScDPResultData* pResultData; MemberArray maMemberArray; MemberHash maMemberHash; - OUString aDimensionName; //! or ptr to IntDimension? + OUString aDimensionName; //! or ptr to IntDimension? long nSortMeasure; ScMemberSortOrder aMemberOrder; // used when sorted by measure bool bIsDataLayout:1; //! or ptr to IntDimension? diff --git a/sc/inc/funcdesc.hxx b/sc/inc/funcdesc.hxx index bb0361def4eb..feabadf9bb82 100644 --- a/sc/inc/funcdesc.hxx +++ b/sc/inc/funcdesc.hxx @@ -28,6 +28,7 @@ #include <sal/types.h> #include <rtl/ustring.hxx> #include <map> +#include <memory> #define MAX_FUNCCAT 12 /* maximum number of categories for functions */ #define LRU_MAX 10 /* maximal number of last recently used functions */ @@ -393,7 +394,7 @@ public: private: ScFunctionList* pFuncList; /**< list of all calc functions */ - std::vector<const ScFuncDesc*>* aCatLists[MAX_FUNCCAT]; /**< array of all categories, 0 is the cumulative ('All') category */ + std::unique_ptr<std::vector<const ScFuncDesc*>> aCatLists[MAX_FUNCCAT]; /**< array of all categories, 0 is the cumulative ('All') category */ mutable std::map< sal_uInt32, std::shared_ptr<ScFunctionCategory> > m_aCategories; /**< map of category pos to IFunctionCategory */ mutable std::vector<const ScFuncDesc*>::iterator pCurCatListIter; /**< position in current category */ mutable std::vector<const ScFuncDesc*>::iterator pCurCatListEnd; /**< end of current category */ |