mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-12 12:14:48 +00:00
Fixed: getLastSeparator should return std::string::size_type instead of an integer
This commit is contained in:
parent
12ebf19bb9
commit
b86acc400b
2 changed files with 3 additions and 3 deletions
|
@ -618,7 +618,7 @@ struct CFile
|
||||||
* Return the position between [begin,end[ of the last separator between path and filename ('/' or '\').
|
* Return the position between [begin,end[ of the last separator between path and filename ('/' or '\').
|
||||||
* If there's no separator, it returns string::npos.
|
* 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 getFilenameWithoutExtension (const std::string &filename);
|
||||||
static std::string getExtension (const std::string &filename);
|
static std::string getExtension (const std::string &filename);
|
||||||
|
|
|
@ -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 ('/');
|
string::size_type pos = filename.find_last_of ('/');
|
||||||
if (pos == string::npos)
|
if (pos == string::npos)
|
||||||
|
@ -1865,7 +1865,7 @@ int CFile::getLastSeparator (const string &filename)
|
||||||
pos = filename.find_last_of ('@');
|
pos = filename.find_last_of ('@');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (int)pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
string CFile::getFilename (const string &filename)
|
string CFile::getFilename (const string &filename)
|
||||||
|
|
Loading…
Reference in a new issue