diff --git a/code/nel/include/nel/misc/path.h b/code/nel/include/nel/misc/path.h index fed90efd5..ffae98f92 100644 --- a/code/nel/include/nel/misc/path.h +++ b/code/nel/include/nel/misc/path.h @@ -618,7 +618,7 @@ struct CFile * Return the position between [begin,end[ of the last separator between path and filename ('/' or '\'). * If there's no separator, it returns string::npos. */ - static int getLastSeparator (const std::string &filename); + static std::string::size_type getLastSeparator (const std::string &filename); static std::string getFilenameWithoutExtension (const std::string &filename); static std::string getExtension (const std::string &filename); diff --git a/code/nel/src/misc/path.cpp b/code/nel/src/misc/path.cpp index 19403c964..7ec61fdd7 100644 --- a/code/nel/src/misc/path.cpp +++ b/code/nel/src/misc/path.cpp @@ -1854,7 +1854,7 @@ std::string CFileContainer::getTemporaryDirectory() ////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////// -int CFile::getLastSeparator (const string &filename) +std::string::size_type CFile::getLastSeparator (const string &filename) { string::size_type pos = filename.find_last_of ('/'); if (pos == string::npos) @@ -1865,7 +1865,7 @@ int CFile::getLastSeparator (const string &filename) pos = filename.find_last_of ('@'); } } - return (int)pos; + return pos; } string CFile::getFilename (const string &filename)