diff options
author | Shauren <shauren.trinity@gmail.com> | 2016-12-10 19:11:10 +0100 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2017-02-06 21:12:27 -0300 |
commit | bf2121680f1aa0065ed2858198e2f21998edd0f4 (patch) | |
tree | e66d9af2ada8b31ad1a8201a956ee057a9b7fd2f /src/server/game/Scripting/ScriptReloadMgr.cpp | |
parent | 4e7679d8bdbe328476192478104224cd342170ac (diff) |
Core/Misc: Added regex compatibility layer to fall back to boost::regex for really old compiler
(cherry picked from commit b6f1f8405f57e3b65c3b838ea87141716023bc72)
Diffstat (limited to 'src/server/game/Scripting/ScriptReloadMgr.cpp')
-rw-r--r-- | src/server/game/Scripting/ScriptReloadMgr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Scripting/ScriptReloadMgr.cpp b/src/server/game/Scripting/ScriptReloadMgr.cpp index 2a2f4f88576..b26ca8e0540 100644 --- a/src/server/game/Scripting/ScriptReloadMgr.cpp +++ b/src/server/game/Scripting/ScriptReloadMgr.cpp @@ -308,12 +308,12 @@ Optional<std::shared_ptr<ScriptModule>> static bool HasValidScriptModuleName(std::string const& name) { // Detects scripts_NAME.dll's / .so's - static std::regex const regex( + static Trinity::regex const regex( Trinity::StringFormat("^%s[sS]cripts_[a-zA-Z0-9_]+\\.%s$", GetSharedLibraryPrefix(), GetSharedLibraryExtension())); - return std::regex_match(name, regex); + return Trinity::regex_match(name, regex); } /// File watcher responsible for watching shared libraries @@ -1529,8 +1529,8 @@ void LibraryUpdateListener::handleFileAction(efsw::WatchID watchid, std::string /// Returns true when the given path has a known C++ file extension static bool HasCXXSourceFileExtension(fs::path const& path) { - static std::regex const regex("^\\.(h|hpp|c|cc|cpp)$"); - return std::regex_match(path.extension().generic_string(), regex); + static Trinity::regex const regex("^\\.(h|hpp|c|cc|cpp)$"); + return Trinity::regex_match(path.extension().generic_string(), regex); } SourceUpdateListener::SourceUpdateListener(fs::path path, std::string script_module_name) |