* Interpret a string argument as a boolean. * * The definition of LocaleIndependentAtoi () requires that non-numeric string values * like "foo", return 0. This means that if a user unintentionally supplies a * non-integer argument here, the return value is always false. This means that * -foo=false does what the user probably expects, but -foo=true is well defined * but does not do what
| 55 | * on the Right Way to change this code), see PR12713. |
| 56 | */ |
| 57 | static bool InterpretBool(const std::string& strValue) |
| 58 | { |
| 59 | if (strValue.empty()) |
| 60 | return true; |
| 61 | return (LocaleIndependentAtoi<int>(strValue) != 0); |
| 62 | } |
| 63 | |
| 64 | static std::string SettingName(const std::string& arg) |
| 65 | { |
no test coverage detected