MCPcopy Create free account
hub / github.com/Kitware/VTK / isUInt64

Method isUInt64

ThirdParty/jsoncpp/vtkjsoncpp/jsoncpp.cpp:3761–3779  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3759}
3760
3761bool Value::isUInt64() const {
3762#if defined(JSON_HAS_INT64)
3763 switch (type()) {
3764 case intValue:
3765 return value_.int_ >= 0;
3766 case uintValue:
3767 return true;
3768 case realValue:
3769 // Note that maxUInt64 (= 2^64 - 1) is not exactly representable as a
3770 // double, so double(maxUInt64) will be rounded up to 2^64. Therefore we
3771 // require the value to be strictly less than the limit.
3772 return value_.real_ >= 0 && value_.real_ < maxUInt64AsDouble &&
3773 IsIntegral(value_.real_);
3774 default:
3775 break;
3776 }
3777#endif // JSON_HAS_INT64
3778 return false;
3779}
3780
3781bool Value::isIntegral() const {
3782 switch (type()) {

Callers

nothing calls this directly

Calls 2

IsIntegralFunction · 0.70
typeEnum · 0.50

Tested by

no test coverage detected