stringid: remove explicit synchronisation

It is more appropriate to synchronise externally, and it simplifies
building across mingw which lacks std::mutex and friends.
This commit is contained in:
Danny Robson 2016-11-17 18:29:35 +11:00
parent e85c31f526
commit 947ec5cdb2

View File

@ -17,7 +17,6 @@
#include "stringid.hpp"
#include <stdexcept>
#include <mutex>
using util::stringid;
@ -29,9 +28,6 @@ stringid::add (const std::string key) {
if (pos != m_map.end ())
throw std::invalid_argument ("duplicate stringid key");
static std::mutex s_lock;
std::lock_guard<std::mutex> guard (s_lock);
id_t id = m_map.size ();
m_map[key] = id;
return id;