include/rtl/strbuf.hxx  |    2 +-
 include/rtl/ustrbuf.hxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7dbc0e991f65b51f2033b8c8c60df055926d37b9
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Fri May 5 07:59:00 2023 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat May 6 07:24:20 2023 +0200

    [API CHANGE] Fix O(U)StringBuffer::insert taking float
    
    It was broken from the start: it was introduced like this already
    in commit 9399c662f36c385b0c705eb34e636a9aec450282
    (initial import, 2000-09-18).
    
    Creating a temporary copy as a return value makes no sense.
    
    Change-Id: I6910d426c2437038ec4979be2c44cd72146dec9c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151375
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    Tested-by: Jenkins

diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx
index b448228d6053..e5ae1ebd0a7b 100644
--- a/include/rtl/strbuf.hxx
+++ b/include/rtl/strbuf.hxx
@@ -1030,7 +1030,7 @@ public:
         @param      f        a <code>float</code>.
         @return     this string buffer.
      */
-    OStringBuffer insert(sal_Int32 offset, float f)
+    OStringBuffer & insert(sal_Int32 offset, float f)
     {
         char sz[RTL_STR_MAX_VALUEOFFLOAT];
         return insert( offset, sz, rtl_str_valueOfFloat( sz, f ) );
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index 578df163d819..363b4f24757f 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -1286,7 +1286,7 @@ public:
         @return     this string buffer.
         @exception  StringIndexOutOfBoundsException  if the offset is invalid.
      */
-    OUStringBuffer insert(sal_Int32 offset, float f)
+    OUStringBuffer & insert(sal_Int32 offset, float f)
     {
         sal_Unicode sz[RTL_USTR_MAX_VALUEOFFLOAT];
         return insert( offset, sz, rtl_ustr_valueOfFloat( sz, f ) );

Reply via email to