Bugfix : Removed useless and weird const_cast from TokenMatch. ( merged from GitHub, thanks to Riku Palomäki ).
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1222 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/5/head
parent
d7341094ca
commit
fa71305e07
|
@ -167,7 +167,8 @@ AI_FORCE_INLINE bool IsNumeric( char_t in)
|
||||||
return ( in >= '0' && in <= '9' ) || '-' == in || '+' == in;
|
return ( in >= '0' && in <= '9' ) || '-' == in || '+' == in;
|
||||||
}
|
}
|
||||||
// ---------------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------------
|
||||||
AI_FORCE_INLINE bool TokenMatch(char*& in, const char* token, unsigned int len)
|
template <class char_t>
|
||||||
|
AI_FORCE_INLINE bool TokenMatch(char_t*& in, const char* token, unsigned int len)
|
||||||
{
|
{
|
||||||
if (!::strncmp(token,in,len) && IsSpaceOrNewLine(in[len]))
|
if (!::strncmp(token,in,len) && IsSpaceOrNewLine(in[len]))
|
||||||
{
|
{
|
||||||
|
@ -192,11 +193,6 @@ AI_FORCE_INLINE bool TokenMatchI(const char*& in, const char* token, unsigned in
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// ---------------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------------
|
||||||
AI_FORCE_INLINE bool TokenMatch(const char*& in, const char* token, unsigned int len)
|
|
||||||
{
|
|
||||||
return TokenMatch(const_cast<char*&>(in), token, len);
|
|
||||||
}
|
|
||||||
// ---------------------------------------------------------------------------------
|
|
||||||
AI_FORCE_INLINE void SkipToken(const char*& in)
|
AI_FORCE_INLINE void SkipToken(const char*& in)
|
||||||
{
|
{
|
||||||
SkipSpaces(&in);
|
SkipSpaces(&in);
|
||||||
|
|
Loading…
Reference in New Issue