| 3759 | } |
| 3760 | |
| 3761 | bool 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 | |
| 3781 | bool Value::isIntegral() const { |
| 3782 | switch (type()) { |
nothing calls this directly
no test coverage detected