fix return value for string2bool

This commit is contained in:
Dane Springmeyer 2014-04-27 08:51:14 -07:00
parent 5beac8fa2b
commit 73517c9104

View file

@ -43,14 +43,16 @@ MAPNIK_DECL inline bool string2bool(std::string const& value, bool & result)
if (value == "true") {
return result = true;
} else if (value == "false") {
return result = false;
result = false;
return true;
}
std::string val(value);
std::transform(val.begin(), val.end(), val.begin(), ::tolower);
if (val == "true" || val == "yes" || val == "1" || val == "on") {
return result = true;
}
return result = false;
result = false;
return true;
}
MAPNIK_DECL inline bool string2bool(const char * iter, const char * end, bool & result)