diff --git a/deps/bitmrc b/deps/bitmrc index 52aa771b..43f63eeb 160000 --- a/deps/bitmrc +++ b/deps/bitmrc @@ -1 +1 @@ -Subproject commit 52aa771b9274056eb1e30b5c7fbfd1669c053265 +Subproject commit 43f63eeb1f900fd03b192e7e577c033a6be072ab diff --git a/deps/protobuf b/deps/protobuf index 9b8da104..74638a25 160000 --- a/deps/protobuf +++ b/deps/protobuf @@ -1 +1 @@ -Subproject commit 9b8da104c12a2947b6e6d7a7da30a3ae56b31675 +Subproject commit 74638a253ea76baa0aed78491b92d157326295a6 diff --git a/src/Components/Modules/Bans.cpp b/src/Components/Modules/Bans.cpp index 3e0f0c07..3f6cbc23 100644 --- a/src/Components/Modules/Bans.cpp +++ b/src/Components/Modules/Bans.cpp @@ -39,7 +39,7 @@ namespace Components Bans::BanList list; Bans::LoadBans(&list); - Bans::AccessMutex.lock(); + std::lock_guard _(Bans::AccessMutex); if (entry.first.Bits) { @@ -102,8 +102,6 @@ namespace Components FileSystem::FileWriter ban("bans.json"); ban.Write(bans.dump()); - - Bans::AccessMutex.unlock(); } void Bans::LoadBans(Bans::BanList* list) diff --git a/src/Components/Modules/Toast.cpp b/src/Components/Modules/Toast.cpp index 2279de8d..f60f1f2e 100644 --- a/src/Components/Modules/Toast.cpp +++ b/src/Components/Modules/Toast.cpp @@ -103,7 +103,7 @@ namespace Components { if (Toast::Queue.empty()) return; - Toast::Mutex.lock(); + std::lock_guard _(Toast::Mutex); Toast::UIToast* toast = &Toast::Queue.front(); @@ -121,8 +121,6 @@ namespace Components { Toast::Draw(toast); } - - Toast::Mutex.unlock(); } Toast::Toast()