| 279 | } |
| 280 | |
| 281 | static cmJSONHelper<bool> Bool( |
| 282 | JsonErrors::ErrorGenerator const& error = JsonErrors::INVALID_BOOL, |
| 283 | bool defval = false) |
| 284 | { |
| 285 | return [error, defval](bool& out, Json::Value const* value, |
| 286 | cmJSONState* state) -> bool { |
| 287 | if (!value) { |
| 288 | out = defval; |
| 289 | return true; |
| 290 | } |
| 291 | if (!value->isBool()) { |
| 292 | error(value, state); |
| 293 | return false; |
| 294 | } |
| 295 | out = value->asBool(); |
| 296 | return true; |
| 297 | }; |
| 298 | } |
| 299 | |
| 300 | static cmJSONHelper<bool> Bool(bool defval) |
| 301 | { |
no test coverage detected
searching dependent graphs…