OGL: Use SplitPath() instead of std::regex.

This commit is contained in:
waddlesplash 2015-09-27 13:26:10 -04:00
parent 5643fe5d1f
commit 06c6f60f5b
1 changed files with 5 additions and 2 deletions

View File

@ -38,7 +38,6 @@ Make AA apply instantly during gameplay if possible
#include <algorithm> #include <algorithm>
#include <cstdarg> #include <cstdarg>
#include <regex>
#include "Common/Atomic.h" #include "Common/Atomic.h"
#include "Common/CommonPaths.h" #include "Common/CommonPaths.h"
@ -105,7 +104,11 @@ static std::vector<std::string> GetShaders(const std::string &sub_dir = "")
}); });
std::vector<std::string> result; std::vector<std::string> result;
for (std::string path : paths) for (std::string path : paths)
result.push_back(std::regex_replace(path, std::regex("^.*/(.*)\\.glsl$"), "$1")); {
std::string name;
SplitPath(path, nullptr, &name, nullptr);
result.push_back(name);
}
return result; return result;
} }