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

Method isUInt

Utilities/cmjsoncpp/src/lib_json/json_value.cpp:1280–1301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1278}
1279
1280bool Value::isUInt() const {
1281 switch (type()) {
1282 case intValue:
1283#if defined(JSON_HAS_INT64)
1284 return value_.int_ >= 0 && LargestUInt(value_.int_) <= LargestUInt(maxUInt);
1285#else
1286 return value_.int_ >= 0;
1287#endif
1288 case uintValue:
1289#if defined(JSON_HAS_INT64)
1290 return value_.uint_ <= maxUInt;
1291#else
1292 return true;
1293#endif
1294 case realValue:
1295 return value_.real_ >= 0 && value_.real_ <= maxUInt &&
1296 IsIntegral(value_.real_);
1297 default:
1298 break;
1299 }
1300 return false;
1301}
1302
1303bool Value::isInt64() const {
1304#if defined(JSON_HAS_INT64)

Callers 4

UIntFunction · 0.80
GetUIntMethod · 0.80
ReadRequestVersionMethod · 0.80

Calls 2

IsIntegralFunction · 0.85
typeClass · 0.50

Tested by 1