diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-21 08:46:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-21 10:10:36 +0200 |
commit | 7c9d99a5cb2702e478f719bfa8167952293c2793 (patch) | |
tree | 7f17690643a4a96a660035685a20d6224ba45715 /bridges | |
parent | 5d30e9e101ae8167c33fe24ca12d8d0685f9f8fb (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>
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/source/jni_uno/jni_info.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
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(), |