[Libreoffice-commits] core.git: tools/source
Stephan Bergmann
sbergman at redhat.com
Wed Mar 22 20:33:15 UTC 2017
tools/source/ref/globname.cxx | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit bd556163d9fa3a01a285a818a01712cff55f5c69
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Mar 22 21:32:40 2017 +0100
Use rtl::isAscii* instead of ctype.h is* (and fix passing plain char)
Change-Id: I83576b55ca421abfe056eb7b66f8f74782100a09
diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx
index d6395b79a33a..28042a78f4b8 100644
--- a/tools/source/ref/globname.cxx
+++ b/tools/source/ref/globname.cxx
@@ -184,8 +184,8 @@ bool SvGlobalName::MakeId( const OUString & rIdStr )
int i = 0;
for( i = 0; i < 8; i++ )
{
- if( isxdigit( *pStr ) )
- if( isdigit( *pStr ) )
+ if( rtl::isAsciiHexDigit( static_cast<unsigned char>(*pStr) ) )
+ if( rtl::isAsciiDigit( static_cast<unsigned char>(*pStr) ) )
nFirst = nFirst * 16 + (*pStr - '0');
else
nFirst = nFirst * 16 + (rtl::toAsciiUpperCase( static_cast<unsigned char>(*pStr) ) - 'A' + 10 );
@@ -198,8 +198,8 @@ bool SvGlobalName::MakeId( const OUString & rIdStr )
pStr++;
for( i = 0; i < 4; i++ )
{
- if( isxdigit( *pStr ) )
- if( isdigit( *pStr ) )
+ if( rtl::isAsciiHexDigit( static_cast<unsigned char>(*pStr) ) )
+ if( rtl::isAsciiDigit( static_cast<unsigned char>(*pStr) ) )
nSec = nSec * 16 + (*pStr - '0');
else
nSec = nSec * 16 + (sal_uInt16)(rtl::toAsciiUpperCase( static_cast<unsigned char>(*pStr) ) - 'A' + 10 );
@@ -212,8 +212,8 @@ bool SvGlobalName::MakeId( const OUString & rIdStr )
pStr++;
for( i = 0; i < 4; i++ )
{
- if( isxdigit( *pStr ) )
- if( isdigit( *pStr ) )
+ if( rtl::isAsciiHexDigit( static_cast<unsigned char>(*pStr) ) )
+ if( rtl::isAsciiDigit( static_cast<unsigned char>(*pStr) ) )
nThird = nThird * 16 + (*pStr - '0');
else
nThird = nThird * 16 + (sal_uInt16)(rtl::toAsciiUpperCase( static_cast<unsigned char>(*pStr) ) - 'A' + 10 );
@@ -227,8 +227,8 @@ bool SvGlobalName::MakeId( const OUString & rIdStr )
pStr++;
for( i = 0; i < 16; i++ )
{
- if( isxdigit( *pStr ) )
- if( isdigit( *pStr ) )
+ if( rtl::isAsciiHexDigit( static_cast<unsigned char>(*pStr) ) )
+ if( rtl::isAsciiDigit( static_cast<unsigned char>(*pStr) ) )
szRemain[i/2] = szRemain[i/2] * 16 + (*pStr - '0');
else
szRemain[i/2] = szRemain[i/2] * 16 + (sal_Int8)(rtl::toAsciiUpperCase( static_cast<unsigned char>(*pStr) ) - 'A' + 10 );
More information about the Libreoffice-commits
mailing list