From f3c2093502389da1feacd41bfd20f32d2e84fb66 Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Fri, 17 Apr 2015 18:04:31 +0200 Subject: [PATCH] emplace into threadSet Map thread and Main thread should be separated in Mode::Static now --- src/mbgl/map/environment.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/mbgl/map/environment.cpp b/src/mbgl/map/environment.cpp index d121f9655..f2112c61b 100644 --- a/src/mbgl/map/environment.cpp +++ b/src/mbgl/map/environment.cpp @@ -36,10 +36,7 @@ public: void registerThread(Environment* env, ThreadType type, const std::string& name) { std::lock_guard lock(mtx); - // FIXME: We should never need to overwrite a thread here and we only allow - // this today because on the Static mode, the Map thread and the Main thread - // are same. Replace this with emplace() when this gets fixed. - threadSet[std::this_thread::get_id()] = ThreadInfo{ env, type, name }; + threadSet.emplace(std::this_thread::get_id(), ThreadInfo{ env, type, name }); } void unregisterThread() {