Merge pull request #212 from Dmitry-Me/reuseConstForNonConst

Reuse const version for non-const one
This commit is contained in:
Lee Thomason 2014-09-27 15:56:42 -07:00
commit 869f1487e2
1 changed files with 1 additions and 4 deletions

View File

@ -523,10 +523,7 @@ public:
return p;
}
static char* SkipWhiteSpace( char* p ) {
while( !IsUTF8Continuation(*p) && isspace( *reinterpret_cast<unsigned char*>(p) ) ) {
++p;
}
return p;
return const_cast<char*>( SkipWhiteSpace( const_cast<const char*>(p) ) );
}
static bool IsWhiteSpace( char p ) {
return !IsUTF8Continuation(p) && isspace( static_cast<unsigned char>(p) );