diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-20 16:50:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-20 18:51:17 +0200 |
commit | 6623d5196467c489585130725866e8993bc8dde2 (patch) | |
tree | bafd071e478cfe0ffea8ea8e30fe620ee7470f31 /tools/source | |
parent | 48271742a062b0fbdedfe9396f942d3f9b5ce46d (diff) |
elide some makeStringAndClear() calls
Change-Id: I4420042f7c8fdf743b888d6f7c1c0d2d3e0b877e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136184
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/fsys/urlobj.cxx | 2 | ||||
-rw-r--r-- | tools/source/memtools/multisel.cxx | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 12a1a797fba0..2b5a191d67c3 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -1898,7 +1898,7 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef, } } - INetURLObject aNewURI(aSynAbsURIRef.makeStringAndClear()); + INetURLObject aNewURI(aSynAbsURIRef); if (aNewURI.HasError()) { // Detect cases where a relative input could not be made absolute diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx index ff81f6c14ccc..739d2874875a 100644 --- a/tools/source/memtools/multisel.cxx +++ b/tools/source/memtools/multisel.cxx @@ -21,6 +21,7 @@ #include <cstddef> +#include <o3tl/string_view.hxx> #include <tools/debug.hxx> #include <tools/multisel.hxx> @@ -586,7 +587,8 @@ bool StringRangeEnumerator::setRange( std::u16string_view aNewRange ) aNumberBuf.append( *pInput++ ); if( !aNumberBuf.isEmpty() ) { - sal_Int32 nNumber = aNumberBuf.makeStringAndClear().toInt32() + mnOffset; + sal_Int32 nNumber = o3tl::toInt32(aNumberBuf) + mnOffset; + aNumberBuf.setLength(0); aNumbers.push_back( nNumber ); bSequence = false; } |