summaryrefslogtreecommitdiffstats
path: root/src/Core/ConfigEntry.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Core/ConfigEntry.h')
-rw-r--r--src/Core/ConfigEntry.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Core/ConfigEntry.h b/src/Core/ConfigEntry.h
index c3bcd1d..fcd8dd4 100644
--- a/src/Core/ConfigEntry.h
+++ b/src/Core/ConfigEntry.h
@@ -20,15 +20,19 @@
#ifndef MAD_CORE_CONFIGENTRY_H_
#define MAD_CORE_CONFIGENTRY_H_
+#include "export.h"
+
#include <stdexcept>
#include <string>
#include <string.h>
#include <vector>
+#include <boost/algorithm/string/case_conv.hpp>
+
namespace Mad {
namespace Core {
-class ConfigEntry {
+class MAD_CORE_EXPORT ConfigEntry {
public:
class String : public std::string {
public:
@@ -36,11 +40,11 @@ class ConfigEntry {
String(const std::string &str) : std::string(str) {}
bool matches(const std::string &str) const {
- return (strcasecmp(c_str(), str.c_str()) == 0);
+ return (boost::algorithm::to_lower_copy(static_cast<const std::string&>(*this)) == boost::algorithm::to_lower_copy(str));
}
};
- class Entry {
+ class MAD_CORE_EXPORT Entry {
private:
String key;
std::vector<String> value;