From ee7935986e0ba0af716ef0795651d3db73bf872e Mon Sep 17 00:00:00 2001 From: "Alexander V. Brezgin" Date: Sun, 20 Nov 2016 03:55:08 +0300 Subject: [PATCH] Optimize value check --- src/lib_json/json_value.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index 1abb006..9710f5b 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -1366,7 +1366,7 @@ bool Value::isIntegral() const { #endif } -bool Value::isDouble() const { return type_ == realValue || isIntegral(); } +bool Value::isDouble() const { return type_ == intValue || type_ == uintValue || type_ == realValue; } bool Value::isNumeric() const { return isDouble(); }