summaryrefslogtreecommitdiffstats
path: root/src/qcstring.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-03-26 18:23:12 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-03-26 18:23:12 (GMT)
commit0dac69c7d148cfa63b746d83e1798f89b2da2251 (patch)
tree0bc7b8f0ed16bb8fd1ccbeea5cef900a62f2dd2e /src/qcstring.cpp
parent1b03538eb097fd32896554749fb6cefc9e195e61 (diff)
downloadDoxygen-0dac69c7d148cfa63b746d83e1798f89b2da2251.zip
Doxygen-0dac69c7d148cfa63b746d83e1798f89b2da2251.tar.gz
Doxygen-0dac69c7d148cfa63b746d83e1798f89b2da2251.tar.bz2
Avoid using std::isspace and friends on potentially multibyte characters
Diffstat (limited to 'src/qcstring.cpp')
-rw-r--r--src/qcstring.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qcstring.cpp b/src/qcstring.cpp
index 2a595cd..0ed5a99 100644
--- a/src/qcstring.cpp
+++ b/src/qcstring.cpp
@@ -188,9 +188,9 @@ QCString QCString::simplifyWhiteSpace() const
char *first = to;
while ( TRUE )
{
- while ( *from && isspace((uchar) *from) )
+ while ( *from && qisspace(*from) )
from++;
- while ( *from && !isspace((uchar)*from) )
+ while ( *from && !qisspace(*from) )
*to++ = *from++;
if ( *from )
*to++ = 0x20; // ' '
@@ -262,7 +262,7 @@ long QCString::toLong(bool *ok,int base) const
int neg = 0;
if ( !p )
goto bye;
- while ( l && isspace(*p) ) // skip leading space
+ while ( l && qisspace(*p) ) // skip leading space
l--,p++;
if ( l && *p == '-' ) {
l--;
@@ -294,7 +294,7 @@ long QCString::toLong(bool *ok,int base) const
}
if ( neg )
val = -val;
- while ( l && isspace(*p) ) // skip trailing space
+ while ( l && qisspace(*p) ) // skip trailing space
l--,p++;
if ( !l )
is_ok = TRUE;
@@ -313,7 +313,7 @@ ulong QCString::toULong(bool *ok,int base) const
bool is_ok = FALSE;
if ( !p )
goto bye;
- while ( l && isspace(*p) ) // skip leading space
+ while ( l && qisspace(*p) ) // skip leading space
l--,p++;
if ( *p == '+' )
l--,p++;
@@ -338,7 +338,7 @@ ulong QCString::toULong(bool *ok,int base) const
p++;
}
- while ( l && isspace(*p) ) // skip trailing space
+ while ( l && qisspace(*p) ) // skip trailing space
l--,p++;
if ( !l )
is_ok = TRUE;
@@ -357,7 +357,7 @@ uint64 QCString::toUInt64(bool *ok,int base) const
bool is_ok = FALSE;
if ( !p )
goto bye;
- while ( l && isspace(*p) ) // skip leading space
+ while ( l && qisspace(*p) ) // skip leading space
l--,p++;
if ( *p == '+' )
l--,p++;
@@ -382,7 +382,7 @@ uint64 QCString::toUInt64(bool *ok,int base) const
p++;
}
- while ( l && isspace(*p) ) // skip trailing space
+ while ( l && qisspace(*p) ) // skip trailing space
l--,p++;
if ( !l )
is_ok = TRUE;