[Libreoffice-commits] .: sal/inc

Lubos Lunak llunak at kemper.freedesktop.org
Fri Apr 6 06:12:02 PDT 2012


 sal/inc/rtl/strbuf.hxx  |    2 +-
 sal/inc/rtl/ustrbuf.hxx |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d91d98a53612a972de368186415aa48698e074d9
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Fri Apr 6 15:08:02 2012 +0200

    fix gcc-4.0.1 and/or 32bit build for string literals
    
    Plain 0 is ambiguous to convert to either long or const char*,
    and just adding an overload next to sal_Int32 would be a dupe if
    they actually are the same type, so just go with plain int, which
    is the sensible thing to do anyway.

diff --git a/sal/inc/rtl/strbuf.hxx b/sal/inc/rtl/strbuf.hxx
index 4500cf0..7711308 100644
--- a/sal/inc/rtl/strbuf.hxx
+++ b/sal/inc/rtl/strbuf.hxx
@@ -130,7 +130,7 @@ public:
 
         @param      length   the initial capacity.
      */
-    explicit OStringBuffer(sal_Int32 length)
+    explicit OStringBuffer(int length)
         : pData(NULL)
         , nCapacity( length )
     {
diff --git a/sal/inc/rtl/ustrbuf.hxx b/sal/inc/rtl/ustrbuf.hxx
index 17deadd..a887107 100644
--- a/sal/inc/rtl/ustrbuf.hxx
+++ b/sal/inc/rtl/ustrbuf.hxx
@@ -125,7 +125,7 @@ public:
 
         @param      length   the initial capacity.
      */
-    explicit OUStringBuffer(sal_Int32 length)
+    explicit OUStringBuffer(int length)
         : pData(NULL)
         , nCapacity( length )
     {
@@ -155,7 +155,7 @@ public:
         : pData(NULL)
         , nCapacity( N - 1 + 16 )
     {
-        rtl_uStringbuffer_newFromStr_WithLength( &pData, literal, N - 1 );
+        rtl_uString_newFromLiteral( &pData, literal, N - 1, 16 );
 #ifdef RTL_STRING_UNITTEST
         rtl_string_unittest_const_literal = true;
 #endif


More information about the Libreoffice-commits mailing list