summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-21 08:46:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-21 10:10:36 +0200
commit7c9d99a5cb2702e478f719bfa8167952293c2793 (patch)
tree7f17690643a4a96a660035685a20d6224ba45715
parent5d30e9e101ae8167c33fe24ca12d8d0685f9f8fb (diff)
elide some makeStringAndClear() calls
Change-Id: Ie8c04a8c414f32cc0e68fbab1d24a9707f179011 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136201 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--basctl/source/basicide/baside2.cxx2
-rw-r--r--basic/source/runtime/runtime.cxx2
-rw-r--r--basic/source/sbx/sbxcurr.cxx2
-rw-r--r--bridges/source/jni_uno/jni_info.cxx10
4 files changed, 5 insertions, 11 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index f73c70ef751a..e75bb32a6478 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -183,7 +183,7 @@ void lcl_ConvertTabsToSpaces( OUString& rLine )
OUStringBuffer aBlanker;
string::padToLength(aBlanker, ( 4 - ( nPos % 4 ) ), ' ');
aResult.remove( nPos, 1 );
- aResult.insert( nPos, aBlanker.makeStringAndClear() );
+ aResult.insert( nPos, aBlanker );
nMax = aResult.getLength();
}
++nPos;
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index f5792fe33dba..93104da1a153 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -2745,7 +2745,7 @@ void SbiRuntime::StepPRINTF() // print TOS in field
}
s.append(s1);
comphelper::string::padToLength(s, 14, ' ');
- pIosys->Write( s.makeStringAndClear() );
+ pIosys->Write( s );
Error( pIosys->GetError() );
}
diff --git a/basic/source/sbx/sbxcurr.cxx b/basic/source/sbx/sbxcurr.cxx
index ad558f2284c1..54b00102dd49 100644
--- a/basic/source/sbx/sbxcurr.cxx
+++ b/basic/source/sbx/sbxcurr.cxx
@@ -148,7 +148,7 @@ static sal_Int64 ImpStringToCurrency( std::u16string_view rStr )
nFractDigit--;
}
- sal_Int64 result = sNormalisedNumString.makeStringAndClear().toInt64();
+ sal_Int64 result = o3tl::toInt64(sNormalisedNumString);
if ( bRoundUp )
++result;
diff --git a/bridges/source/jni_uno/jni_info.cxx b/bridges/source/jni_uno/jni_info.cxx
index 81ad9323de48..434322f3003c 100644
--- a/bridges/source/jni_uno/jni_info.cxx
+++ b/bridges/source/jni_uno/jni_info.cxx
@@ -172,12 +172,9 @@ JNI_interface_type_info::JNI_interface_type_info(
sig_buf.append( "()" );
sig_buf.append( type_sig );
OString method_signature( sig_buf.makeStringAndClear() );
- OUStringBuffer name_buf( 3 + member_name.getLength() );
- name_buf.append( "get" );
- name_buf.append( member_name );
OString method_name(
OUStringToOString(
- name_buf.makeStringAndClear(),
+ rtl::OUStringConcatenation("get" + member_name),
RTL_TEXTENCODING_JAVA_UTF8 ) );
m_methods[ nMethodIndex ] = jni->GetMethodID(
static_cast<jclass>(jo_class.get()), method_name.getStr(),
@@ -193,11 +190,8 @@ JNI_interface_type_info::JNI_interface_type_info(
sig_buf.append( type_sig );
sig_buf.append( ")V" );
method_signature = sig_buf.makeStringAndClear();
- name_buf.ensureCapacity( 3 + member_name.getLength() );
- name_buf.append( "set" );
- name_buf.append( member_name );
method_name = OUStringToOString(
- name_buf.makeStringAndClear(),
+ rtl::OUStringConcatenation("set" + member_name),
RTL_TEXTENCODING_JAVA_UTF8 );
m_methods[ nMethodIndex ] = jni->GetMethodID(
static_cast<jclass>(jo_class.get()), method_name.getStr(),