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-9d2fd5bffc1f
pull/5/head
kimmi 2012-03-20 21:03:14 +00:00
parent d7341094ca
commit fa71305e07
1 changed files with 2 additions and 6 deletions

View File

@ -167,7 +167,8 @@ AI_FORCE_INLINE bool IsNumeric( char_t 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]))
{
@ -192,11 +193,6 @@ AI_FORCE_INLINE bool TokenMatchI(const char*& in, const char* token, unsigned in
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)
{
SkipSpaces(&in);