summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-03-16 10:13:09 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-03-16 10:13:09 +0000
commit66584aa981fb65299f3e62a90dbb1e47ffed3b4b (patch)
treef313d062b4a8450bac3e3acc6dbe2d3a600a95b3 /comphelper
parentec1522ea64ac91fbe62fafe4286ae56cc21bef08 (diff)
WaE: remove some warnings
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/qa/string/test_string.cxx5
-rw-r--r--comphelper/source/misc/string.cxx2
2 files changed, 4 insertions, 3 deletions
diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx
index 58fa60a151e7..c448ebb9fb45 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 9a9a9b8901c5..18ad6ad4fe9f 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