| 255 | }; |
| 256 | |
| 257 | static cmJSONHelper<unsigned int> UInt( |
| 258 | JsonErrors::ErrorGenerator const& error = JsonErrors::INVALID_UINT, |
| 259 | unsigned int defval = 0) |
| 260 | { |
| 261 | return [error, defval](unsigned int& out, Json::Value const* value, |
| 262 | cmJSONState* state) -> bool { |
| 263 | if (!value) { |
| 264 | out = defval; |
| 265 | return true; |
| 266 | } |
| 267 | if (!value->isUInt()) { |
| 268 | error(value, state); |
| 269 | return false; |
| 270 | } |
| 271 | out = value->asUInt(); |
| 272 | return true; |
| 273 | }; |
| 274 | } |
| 275 | |
| 276 | static cmJSONHelper<unsigned int> UInt(unsigned int defval) |
| 277 | { |
no test coverage detected
searching dependent graphs…