diff --git a/tiny_gltf.h b/tiny_gltf.h index 6188dc0..586f8da 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -2041,8 +2041,7 @@ static std::string GetBaseDir(const std::string &filepath) { } static std::string GetBaseFilename(const std::string &filepath) { - constexpr char path_separators[2] = { '/', '\\' }; - auto idx = filepath.find_last_of(path_separators); + auto idx = filepath.find_last_of("/\\"); if (idx != std::string::npos) return filepath.substr(idx + 1); return filepath;