diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-22 14:23:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-23 08:04:54 +0100 |
commit | 2a1fb4401da16f6a18c0bd05fe4b460a3048f9b5 (patch) | |
tree | e659812bc29bb01db62cde81f3d218758b26e07c /configmgr | |
parent | 7f42b0f96a2798ae99aa65b84b0db3b2af2b282b (diff) |
loplugin:passstuffbyref improved returns
improve the detection of stuff we can return by const &, instead of by
copying
Change-Id: I479ae89d0413125a8295cc3cddbc0017ed61ed69
Reviewed-on: https://gerrit.libreoffice.org/46915
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/childaccess.cxx | 2 | ||||
-rw-r--r-- | configmgr/source/childaccess.hxx | 2 | ||||
-rw-r--r-- | configmgr/source/type.cxx | 2 | ||||
-rw-r--r-- | configmgr/source/type.hxx | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx index c45901fac623..a13cbc3b6e14 100644 --- a/configmgr/source/childaccess.cxx +++ b/configmgr/source/childaccess.cxx @@ -65,7 +65,7 @@ namespace class theChildAccessUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theChildAccessUnoTunnelId > {}; } -css::uno::Sequence< sal_Int8 > ChildAccess::getTunnelId() +css::uno::Sequence< sal_Int8 > const & ChildAccess::getTunnelId() { return theChildAccessUnoTunnelId::get().getSeq(); } diff --git a/configmgr/source/childaccess.hxx b/configmgr/source/childaccess.hxx index 5a0ab480ec0d..eeb7eddeab62 100644 --- a/configmgr/source/childaccess.hxx +++ b/configmgr/source/childaccess.hxx @@ -54,7 +54,7 @@ class ChildAccess: public css::lang::XUnoTunnel { public: - static css::uno::Sequence< sal_Int8 > getTunnelId(); + static css::uno::Sequence< sal_Int8 > const & getTunnelId(); ChildAccess( Components & components, rtl::Reference< RootAccess > const & root, diff --git a/configmgr/source/type.cxx b/configmgr/source/type.cxx index 9924aef4d4d4..f0d109d74fcc 100644 --- a/configmgr/source/type.cxx +++ b/configmgr/source/type.cxx @@ -63,7 +63,7 @@ Type elementType(Type type) { } } -css::uno::Type mapType(Type type) { +css::uno::Type const & mapType(Type type) { switch (type) { case TYPE_ANY: return cppu::UnoType< css::uno::Any >::get(); diff --git a/configmgr/source/type.hxx b/configmgr/source/type.hxx index 091c3f353cb4..8550796b22d3 100644 --- a/configmgr/source/type.hxx +++ b/configmgr/source/type.hxx @@ -39,7 +39,7 @@ bool isListType(Type type); Type elementType(Type type); -css::uno::Type mapType(Type type); +css::uno::Type const & mapType(Type type); Type getDynamicType(css::uno::Any const & value); |