mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
fix return value for string2bool
This commit is contained in:
parent
5beac8fa2b
commit
73517c9104
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user