diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-05 14:52:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-05 17:00:14 +0200 |
commit | ec56174b0c83411b762b0992565e58c1ec4fc3f3 (patch) | |
tree | 039e219726643a3281762af65a3c9ec8c68fada8 /bridges/inc | |
parent | 7af38dd4fdaff8ae2ca12e2fe7e2319bcc6bdeba (diff) |
loplugin:useuniqueptr in VtableFactory
Change-Id: I122b6749f148abb48f646bfcd32ef86e2f5fa553
Reviewed-on: https://gerrit.libreoffice.org/78651
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'bridges/inc')
-rw-r--r-- | bridges/inc/vtablefactory.hxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bridges/inc/vtablefactory.hxx b/bridges/inc/vtablefactory.hxx index 6978e3c670b5..369ea0b903bf 100644 --- a/bridges/inc/vtablefactory.hxx +++ b/bridges/inc/vtablefactory.hxx @@ -26,6 +26,7 @@ #include <sal/types.h> #include <typelib/typedescription.hxx> +#include <memory> #include <unordered_map> /*See: http://people.redhat.com/drepper/selinux-mem.html*/ @@ -92,10 +93,10 @@ public: mapBlockToVtable). Also, the block contains any generated code snippets, after the vtable itself.</p> */ - Block * blocks; + std::unique_ptr<Block[]> blocks; + Vtables() : count(0) - , blocks(nullptr) { } }; @@ -107,7 +108,7 @@ public: /** Given an interface type description, return its corresponding vtable structure. */ - Vtables getVtables(typelib_InterfaceTypeDescription * type); + const Vtables& getVtables(typelib_InterfaceTypeDescription * type); // This function is not defined in the generic part, but instead has to be // defined individually for each CPP--UNO bridge: |