Swaps static variable instantiation order in pause.cpp

develop
Josh Cooper 2022-10-13 23:22:51 -07:00
parent 5c785d4bd7
commit ffed499057
1 changed files with 3 additions and 3 deletions

@ -12,6 +12,9 @@ using namespace DFHack;
using namespace Pausing;
using namespace df::enums;
std::unordered_set<Lock*> PlayerLock::locks;
std::unordered_set<Lock*> AnnouncementLock::locks;
namespace pausing {
AnnouncementLock announcementLock("monitor");
PlayerLock playerLock("monitor");
@ -39,9 +42,6 @@ namespace pausing {
}
using namespace pausing;
std::unordered_set<Lock*> PlayerLock::locks;
std::unordered_set<Lock*> AnnouncementLock::locks;
template<typename Locks>
inline bool any_lock(Locks locks) {
return std::any_of(locks.begin(), locks.end(), [](Lock* lock) { return lock->isLocked(); });