summaryrefslogtreecommitdiffstats
path: root/include/rtl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2021-11-20 08:16:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-21 15:47:25 +0100
commitdc2010964fb8d18d5c4fe96172ee082276a1e587 (patch)
treee90e1d4ec418e1d9265f11daced515901faf1153 /include/rtl
parentosl::Mutex->std::mutex in framework::ConfigAccess (diff)
downloadcore-dc2010964fb8d18d5c4fe96172ee082276a1e587.tar.gz
core-dc2010964fb8d18d5c4fe96172ee082276a1e587.zip
tdf#133835 speedup calc autofilter (5)
Tweak INetURLObject to reduce the number of OUString and OUStringBuffer we create, saves 5% And add a asView() method to OUStringConstExpr, to make it easier to pass to OUStringBuffer::insert Change-Id: I115ec2398cfc8df39bd1efbbd5f0d5cc9712dba7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125600 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/rtl')
-rw-r--r--include/rtl/ustring.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index e5b58be8c52d..e14549482f35 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -161,6 +161,11 @@ public:
// no destructor necessary because we know we are pointing at a compile-time
// constant OUStringLiteral, which bypasses ref-counting.
+ /**
+ make it easier to pass to OUStringBuffer and similar without casting/converting
+ */
+ constexpr std::u16string_view asView() const { return {pData->buffer, static_cast<sal_uInt32>(pData->length)}; }
+
inline operator const OUString&() const;
private: