diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-01 16:03:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-02 11:56:45 +0200 |
commit | b392d0a25e229f305497ab5f9f084b71b24cc387 (patch) | |
tree | 41df3434451c4c139fadb6dd4491b02796d3dbdc /svl | |
parent | 3869673f95fce5e83c9d5d9eaf08f21f36ad0bd6 (diff) |
tdf#150712 reduce cost of SharedString::getString
where the construction of empty strings is significant here
which required fixing a couple of places that ended up using
a reference to a temporary.
Change-Id: I52feb1673bd39db4060585ac8d9ae2f3dea27fc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139210
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/misc/sharedstring.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/svl/source/misc/sharedstring.cxx b/svl/source/misc/sharedstring.cxx index 1bb05c6ace50..71f3354eca51 100644 --- a/svl/source/misc/sharedstring.cxx +++ b/svl/source/misc/sharedstring.cxx @@ -14,6 +14,7 @@ namespace svl { /** ref-counting traffic associated with SharedString temporaries can be significant, so use a singleton here, so we can return a const& from getEmptyString */ static OUString EMPTY(u""); const SharedString EMPTY_SHARED_STRING(EMPTY.pData, EMPTY.pData); +const OUString SharedString::EMPTY_STRING {}; const SharedString & SharedString::getEmptyString() { |