From b3ed57f43d0fc18de5ac2610eabc5a97d9eea4a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gl=C3=B6ckner?= Date: Thu, 31 Mar 2016 10:15:37 +0200 Subject: Added thread-safety to implicit cpy/mv assign op for synced group settings --- src/syncedsettings.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/syncedsettings.h b/src/syncedsettings.h index eb8e66e..e60eb78 100644 --- a/src/syncedsettings.h +++ b/src/syncedsettings.h @@ -76,6 +76,7 @@ public: : mutex{} , data{} { + std::lock_guard lock{mutex}; std::lock_guard lock{other.mutex}; data = other.data; } @@ -84,6 +85,7 @@ public: : mutex{} , data{} { + std::lock_guard lock{mutex}; std::lock_guard lock{other.mutex}; std::swap(data, other.data); } -- cgit v1.2.3