summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Morris <michael.patrick.morris@gmail.com>2015-04-17 18:04:31 +0200
committerThiago Marcos P. Santos <thiago@mapbox.com>2015-05-15 12:58:22 +0300
commitf3c2093502389da1feacd41bfd20f32d2e84fb66 (patch)
treeee3f4490e88473b09cdc95093eaf1d66dd98d8fc
parent377a10d257b7c1f88ba2ed85ff0776fc2694d629 (diff)
downloadqtlocation-mapboxgl-f3c2093502389da1feacd41bfd20f32d2e84fb66.tar.gz
emplace into threadSet
Map thread and Main thread should be separated in Mode::Static now
-rw-r--r--src/mbgl/map/environment.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mbgl/map/environment.cpp b/src/mbgl/map/environment.cpp
index d121f96555..f2112c61b2 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<std::mutex> 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() {