MCPcopy Create free account
hub / github.com/Kitware/CMake / Int

Function Int

Source/cmJSONHelpers.h:233–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231 };
232
233 static cmJSONHelper<int> Int(
234 JsonErrors::ErrorGenerator const& error = JsonErrors::INVALID_INT,
235 int defval = 0)
236 {
237 return [error, defval](int& out, Json::Value const* value,
238 cmJSONState* state) -> bool {
239 if (!value) {
240 out = defval;
241 return true;
242 }
243 if (!value->isInt()) {
244 error(value, state);
245 return false;
246 }
247 out = value->asInt();
248 return true;
249 };
250 }
251
252 static cmJSONHelper<int> Int(int defval)
253 {

Callers 7

asIntMethod · 0.85
value.hFile · 0.85
PresetIntHelperFunction · 0.85

Calls 3

errorFunction · 0.85
isIntMethod · 0.80
asIntMethod · 0.80

Tested by

no test coverage detected