[Libreoffice-commits] .: comphelper/qa comphelper/source

Caolán McNamara caolan at kemper.freedesktop.org
Wed Mar 16 03:13:16 PDT 2011


 comphelper/qa/string/test_string.cxx |    5 +++--
 comphelper/source/misc/string.cxx    |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 6a436da1aaec3bb201957e336753f8a8c622703b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Mar 16 10:13:09 2011 +0000

    WaE: remove some warnings

diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx
index 49a9c24..6b3f5c5 100644
--- a/comphelper/qa/string/test_string.cxx
+++ b/comphelper/qa/string/test_string.cxx
@@ -88,10 +88,11 @@ void TestString::test()
     CPPUNIT_ASSERT(n3 == -1);
 }
 
-void TestString::testDecimalStringToNumber() {
+void TestString::testDecimalStringToNumber()
+{
     rtl::OUString s1(RTL_CONSTASCII_USTRINGPARAM("1234"));
     CPPUNIT_ASSERT_EQUAL((sal_uInt32)1234, comphelper::string::decimalStringToNumber(s1));
-    s1 += rtl::OUString(L'\u07C6');
+    s1 += rtl::OUString(static_cast<sal_Unicode>(0x07C6));
     CPPUNIT_ASSERT_EQUAL((sal_uInt32)12346, comphelper::string::decimalStringToNumber(s1));
     // Codepoints on 2 16bits words
     sal_uInt32 utf16String[] = { 0x1D7FE /* 8 */, 0x1D7F7 /* 1 */};
diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx
index b4ab7a6..3e0cc6c 100644
--- a/comphelper/source/misc/string.cxx
+++ b/comphelper/source/misc/string.cxx
@@ -101,7 +101,7 @@ sal_uInt32 decimalStringToNumber(
     for( sal_Int32 i = 0 ; i < str.getLength() ; )
     {
         sal_uInt32 c = str.iterateCodePoints(&i);
-        sal_uInt8 value = 0;
+        sal_uInt32 value = 0;
         if( c <= 0x0039)    // ASCII decimal digits, most common
             value = c - 0x0030;
         else if( c >= 0x1D7F6 )    // mathematical monospace digits


More information about the Libreoffice-commits mailing list