fix return value for string2bool
This commit is contained in:
parent
5beac8fa2b
commit
73517c9104
1 changed files with 4 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue