summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/string_compare_type.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/string_compare_type.hpp b/src/core/string_compare_type.hpp
new file mode 100644
index 000000000..c4bb71819
--- /dev/null
+++ b/src/core/string_compare_type.hpp
@@ -0,0 +1,15 @@
+/* $Id$ */
+
+/** @file string_compare_type.hpp Comparator class for "const char *" so it can be used as a key for std::map */
+
+#ifndef STRING_COMPARE_TYPE_HPP
+#define STRING_COMPARE_TYPE_HPP
+
+struct StringCompare {
+ bool operator () (const char *a, const char *b) const
+ {
+ return strcmp(a, b) < 0;
+ }
+};
+
+#endif /* STRING_COMPARE_TYPE_HPP */