|
|
@ -819,7 +819,7 @@ public:
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma warning(push)
|
|
|
|
#pragma warning(push)
|
|
|
|
#pragma warning(disable : 4127) // consider using 'if constexpr' instead
|
|
|
|
#pragma warning(disable : 4127) // consider using 'if constexpr' instead
|
|
|
|
#endif // _MSC_VER
|
|
|
|
#endif // _MSC_VER
|
|
|
|
static const char *basename(const char *filename)
|
|
|
|
static const char *basename(const char *filename)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// if the size is 2 (1 character + null terminator) we can use the more efficient strrchr
|
|
|
|
// if the size is 2 (1 character + null terminator) we can use the more efficient strrchr
|
|
|
@ -831,8 +831,8 @@ public:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const std::reverse_iterator<const char*> begin(filename + std::strlen(filename));
|
|
|
|
const std::reverse_iterator<const char *> begin(filename + std::strlen(filename));
|
|
|
|
const std::reverse_iterator<const char*> end(filename);
|
|
|
|
const std::reverse_iterator<const char *> end(filename);
|
|
|
|
|
|
|
|
|
|
|
|
const auto it = std::find_first_of(begin, end, std::begin(os::folder_seps), std::end(os::folder_seps) - 1);
|
|
|
|
const auto it = std::find_first_of(begin, end, std::begin(os::folder_seps), std::end(os::folder_seps) - 1);
|
|
|
|
return it != end ? it.base() : filename;
|
|
|
|
return it != end ? it.base() : filename;
|
|
|
|