diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-01-01 00:26:53 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2023-08-12 14:24:24 +0200 |
commit | b7287e85e4bc8acb2b95271ece9dd8a5b93873cd (patch) | |
tree | 6088602ac914ef69573ce551d7fc4f0613beb5ce /src/server/game/Scripting/ScriptReloadMgr.cpp | |
parent | f9033a5dbd559fde3030a21d83d664983d95f39f (diff) |
Core/Misc: Fixed deprecation warnings for c++20
(cherry picked from commit ba9bbbc9d0c3b80d8954ad6390d23ae3d0f804b2)
Diffstat (limited to 'src/server/game/Scripting/ScriptReloadMgr.cpp')
-rw-r--r-- | src/server/game/Scripting/ScriptReloadMgr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Scripting/ScriptReloadMgr.cpp b/src/server/game/Scripting/ScriptReloadMgr.cpp index 321af22be02..b2f20bff184 100644 --- a/src/server/game/Scripting/ScriptReloadMgr.cpp +++ b/src/server/game/Scripting/ScriptReloadMgr.cpp @@ -986,7 +986,7 @@ private: // the module which prevents it from unloading. // The module will be unloaded once all scripts provided from the module // are destroyed. - if (!ref->second.first.unique()) + if (ref->second.first.use_count() != 1) { TC_LOG_INFO("scripts.hotswap", "Script module %s is still used by %lu spell, aura or instance scripts. " @@ -1569,7 +1569,7 @@ void SourceUpdateListener::handleFileAction(efsw::WatchID watchid, std::string c return; } - auto const path = fs::absolute( + fs::path path = fs::absolute( filename, dir); @@ -1578,7 +1578,7 @@ void SourceUpdateListener::handleFileAction(efsw::WatchID watchid, std::string c return; /// Thread safe part - sScriptReloadMgr->QueueMessage([=](HotSwapScriptReloadMgr* reloader) + sScriptReloadMgr->QueueMessage([=, this, path = std::move(path)](HotSwapScriptReloadMgr* reloader) { TC_LOG_TRACE("scripts.hotswap", "Detected source change on module \"%s\", " "queued for recompilation...", script_module_name_.c_str()); |