aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/base/scan_name.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-10-12 15:32:14 -0400
committerJack Lloyd <[email protected]>2016-10-12 15:32:14 -0400
commited9e147695e4c5e800e83654baf365a634f3a2a7 (patch)
tree59bad402cff7d7af9baa5fd79081d677b60afc83 /src/lib/base/scan_name.cpp
parentd59b164a2ad2bc2290265530ac1a5c7be7855975 (diff)
Abstract out mutex type. Make threads optional.
Diffstat (limited to 'src/lib/base/scan_name.cpp')
-rw-r--r--src/lib/base/scan_name.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/base/scan_name.cpp b/src/lib/base/scan_name.cpp
index 08f5e8702..76d9b1a17 100644
--- a/src/lib/base/scan_name.cpp
+++ b/src/lib/base/scan_name.cpp
@@ -172,7 +172,7 @@ size_t SCAN_Name::arg_as_integer(size_t i, size_t def_value) const
return to_u32bit(m_args[i]);
}
-std::mutex SCAN_Name::g_alias_map_mutex;
+mutex_type SCAN_Name::g_alias_map_mutex;
std::map<std::string, std::string> SCAN_Name::g_alias_map = {
{ "3DES", "TripleDES" },
{ "ARC4", "RC4" },
@@ -197,7 +197,7 @@ std::map<std::string, std::string> SCAN_Name::g_alias_map = {
void SCAN_Name::add_alias(const std::string& alias, const std::string& basename)
{
- std::lock_guard<std::mutex> lock(g_alias_map_mutex);
+ lock_guard_type<mutex_type> lock(g_alias_map_mutex);
if(g_alias_map.find(alias) == g_alias_map.end())
g_alias_map[alias] = basename;
@@ -205,7 +205,7 @@ void SCAN_Name::add_alias(const std::string& alias, const std::string& basename)
std::string SCAN_Name::deref_alias(const std::string& alias)
{
- std::lock_guard<std::mutex> lock(g_alias_map_mutex);
+ lock_guard_type<mutex_type> lock(g_alias_map_mutex);
std::string name = alias;