MCPcopy Create free account
hub / github.com/SOUI2/soui / isUInt64

Method isUInt64

third-part/jsoncpp/src/lib_json/json_value.cpp:1368–1386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1366}
1367
1368bool Value::isUInt64() const {
1369#if defined(JSON_HAS_INT64)
1370 switch (type_) {
1371 case intValue:
1372 return value_.int_ >= 0;
1373 case uintValue:
1374 return true;
1375 case realValue:
1376 // Note that maxUInt64 (= 2^64 - 1) is not exactly representable as a
1377 // double, so double(maxUInt64) will be rounded up to 2^64. Therefore we
1378 // require the value to be strictly less than the limit.
1379 return value_.real_ >= 0 && value_.real_ < maxUInt64AsDouble &&
1380 IsIntegral(value_.real_);
1381 default:
1382 break;
1383 }
1384#endif // JSON_HAS_INT64
1385 return false;
1386}
1387
1388bool Value::isIntegral() const {
1389 switch (type_) {

Callers 1

checkIsMethod · 0.80

Calls 1

IsIntegralFunction · 0.85

Tested by

no test coverage detected