From 8441ecf6bf8aed491f2c4dc2abd7da3aeb5144e6 Mon Sep 17 00:00:00 2001 From: kimmi Date: Mon, 28 May 2012 10:19:50 +0000 Subject: [PATCH] Bugfix : Fix a compiler issue with OSX and Linux. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1250 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/ObjTools.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/ObjTools.h b/code/ObjTools.h index 61e439eb6..dfe51d328 100644 --- a/code/ObjTools.h +++ b/code/ObjTools.h @@ -222,6 +222,12 @@ inline char_t getFloat( char_t it, char_t end, float &value ) return it; } +/** @brief Will perform a simple tokenize. + * @param str String to tokenize. + * @param tokens Array with tokens, will be empty if no token was found. + * @param delimiters Delimiter for tokenize. + * @return Number of found token. + */ template unsigned int tokenize( const string_type& str, std::vector& tokens, const string_type& delimiters ) @@ -230,7 +236,7 @@ unsigned int tokenize( const string_type& str, std::vector& tokens, string_type::size_type lastPos = str.find_first_not_of( delimiters, 0 ); // Find first "non-delimiter". - string_type::size_type pos = str.find_first_of( delimiters, lastPos ); + size_t pos = str.find_first_of( delimiters, lastPos ); while ( string_type::npos != pos || string_type::npos != lastPos ) { // Found a token, add it to the vector.