From ec56174b0c83411b762b0992565e58c1ec4fc3f3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 5 Sep 2019 14:52:13 +0200 Subject: loplugin:useuniqueptr in VtableFactory Change-Id: I122b6749f148abb48f646bfcd32ef86e2f5fa553 Reviewed-on: https://gerrit.libreoffice.org/78651 Tested-by: Jenkins Reviewed-by: Noel Grandin --- bridges/inc/vtablefactory.hxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bridges/inc') 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 #include +#include #include /*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.

*/ - Block * blocks; + std::unique_ptr 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: -- cgit