tools/source/fsys/urlobj.cxx       |    2 +-
 tools/source/memtools/multisel.cxx |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 6623d5196467c489585130725866e8993bc8dde2
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Jun 20 16:50:29 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Jun 20 18:51:17 2022 +0200

    elide some makeStringAndClear() calls
    
    Change-Id: I4420042f7c8fdf743b888d6f7c1c0d2d3e0b877e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136184
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

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;
         }

Reply via email to