cxxrtl: Fix formating

This commit is contained in:
Henri Nurmi 2023-12-10 08:15:41 +02:00 committed by Catherine
parent 79c0bfcb22
commit 1c8e58a736
1 changed files with 5 additions and 7 deletions

View File

@ -630,18 +630,16 @@ std::string escape_cxx_string(const std::string &input)
std::string basename(const std::string &filepath)
{
#ifndef _WIN32
const std::string dir_seps = "/";
#else
#ifdef _WIN32
const std::string dir_seps = "\\/";
#else
const std::string dir_seps = "/";
#endif
size_t sep_pos = filepath.find_last_of(dir_seps);
if (sep_pos != std::string::npos) {
if (sep_pos != std::string::npos)
return filepath.substr(sep_pos + 1);
}
else {
else
return filepath;
}
}
template<class T>