diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-08-18 15:58:17 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-08-18 15:58:17 +0200 |
commit | db5ad2e09a6b38e841463dbe7eb076492b62c948 (patch) | |
tree | 5907f6416e35cbd25432a5f1f6dc9664d36aa73c /src/Core/ConfigEntry.h | |
parent | 5da7b0847bac2a5abec95b9ac1701b74baae8964 (diff) | |
download | mad-db5ad2e09a6b38e841463dbe7eb076492b62c948.tar mad-db5ad2e09a6b38e841463dbe7eb076492b62c948.zip |
Mad funktioniert jetzt unter Windows
Diffstat (limited to 'src/Core/ConfigEntry.h')
-rw-r--r-- | src/Core/ConfigEntry.h | 10 |
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; |