#include <cassert>
#include <boost/foreach.hpp>
+#include <boost/algorithm/string/case_conv.hpp>
#include <simgear/debug/logstream.hxx>
#include <simgear/structure/exception.hxx>
m_props = const_cast<SGPropertyNode*>(aProps);
// cache tag values
BOOST_FOREACH(const SGPropertyNode* c, aProps->getChildren("tag")) {
- m_tags.insert(c->getStringValue());
+ std::string t(c->getStringValue());
+ m_tags.insert(boost::to_lower_copy(t));
}
}
if (strcmp(c->getName(), "tag") == 0) {
std::string tag(c->getStringValue());
+ boost::to_lower(tag);
if (m_tags.find(tag) == m_tags.end()) {
return false;
}
// substring search of name, description
if (strcmp(c->getName(), "name") == 0) {
std::string n(c->getStringValue());
- size_t pos = name().find(n);
+ boost::to_lower(n);
+ size_t pos = boost::to_lower_copy(name()).find(n);
if (pos == std::string::npos) {
return false;
}
if (strcmp(c->getName(), "description") == 0) {
std::string n(c->getStringValue());
- size_t pos = description().find(n);
+ boost::to_lower(n);
+ size_t pos = boost::to_lower_copy(description()).find(n);
if (pos == std::string::npos) {
return false;
}