diff options
author | Noel Grandin <noel@peralex.com> | 2014-03-06 15:29:08 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-03-18 08:32:26 +0200 |
commit | 86a32589e90ee983159fb5b2c6a594428ab7d422 (patch) | |
tree | 6de946fe2b9b25614f0d197af95e9d3aadcd1bd9 /forms/source | |
parent | bb17844099ba98a77c8e5d7a25c0c416a4b0641e (diff) |
Find places where OUString and OString are passed by value.
It's not very efficient, because we generally end up copying it twice -
once into the parameter and again into the destination OUString.
So I create a clang plugin that finds such places and generates a
warning so that we can convert them to pass-by-reference.
Change-Id: I5341a6ea9e3190f4b4c05c42c85595e3dcd83361
Diffstat (limited to 'forms/source')
-rw-r--r-- | forms/source/component/ListBox.cxx | 2 | ||||
-rw-r--r-- | forms/source/misc/services.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index c103c65deb4d..12fba621e42d 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -100,7 +100,7 @@ namespace frm { } - void operator()( const OUString _append ) + void operator()( const OUString& _append ) { m_string += _append; } diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx index 4b7416c5e32a..2228bc06d164 100644 --- a/forms/source/misc/services.cxx +++ b/forms/source/misc/services.cxx @@ -99,7 +99,7 @@ static Sequence<sal_Int64> s_aFactories; void registerClassInfo( - OUString _rClassImplName, // the ImplName of the class + const OUString& _rClassImplName, // the ImplName of the class const Sequence< OUString >& _rServiceNames, // the services supported by this class ::cppu::ComponentInstantiation _pCreateFunction // the method for instantiating such a class ) |