Make global instance init thread-safe.

Use local statics except for Visual C++ < 2015.
This commit is contained in:
Peter Johnson
2015-07-20 23:36:22 -07:00
parent 5df62ac172
commit b4c65dc210
5 changed files with 59 additions and 9 deletions

View File

@@ -15,7 +15,7 @@
using namespace nt;
std::unique_ptr<Storage> Storage::m_instance;
ATOMIC_STATIC_INIT(Storage)
Storage::Storage() {
m_updates_enabled = false;