WaE: remove some warnings
This commit is contained in:
parent
ec1522ea64
commit
66584aa981
@ -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 */};
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user