summaryrefslogtreecommitdiffstats
path: root/src/linkedmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/linkedmap.h')
-rw-r--r--src/linkedmap.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/linkedmap.h b/src/linkedmap.h
index 76d906d..3abc069 100644
--- a/src/linkedmap.h
+++ b/src/linkedmap.h
@@ -3,8 +3,8 @@
* Copyright (C) 1997-2020 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
- * documentation under the terms of the GNU General Public License is hereby
- * granted. No representations are made about the suitability of this software
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
@@ -58,7 +58,7 @@ class LinkedMap
{
Ptr ptr = std::make_unique<T>(key,std::forward<Args>(args)...);
result = ptr.get();
- m_lookup.insert({std::string(key),result});
+ m_lookup.insert({key ? std::string(key) : std::string(),result});
m_entries.push_back(std::move(ptr));
}
return result;