summaryrefslogtreecommitdiffstats
path: root/base/json
diff options
context:
space:
mode:
authoravi <avi@chromium.org>2015-12-03 08:46:54 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-03 16:47:49 +0000
commit7e3976acf2547251b34ca0aebf1428d72d3e5985 (patch)
tree5c67fe0e665b8d613f6a51a102276c6b7bdd3508 /base/json
parent5d2e9c3ce9d185794978fee56cc952822a4adf5f (diff)
downloadchromium_src-7e3976acf2547251b34ca0aebf1428d72d3e5985.zip
chromium_src-7e3976acf2547251b34ca0aebf1428d72d3e5985.tar.gz
chromium_src-7e3976acf2547251b34ca0aebf1428d72d3e5985.tar.bz2
Remove kint64min.
BUG=138542 Review URL: https://codereview.chromium.org/1472083005 Cr-Commit-Position: refs/heads/master@{#362995}
Diffstat (limited to 'base/json')
-rw-r--r--base/json/json_writer.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/base/json/json_writer.cc b/base/json/json_writer.cc
index abfead8..2d3ae0f 100644
--- a/base/json/json_writer.cc
+++ b/base/json/json_writer.cc
@@ -4,7 +4,10 @@
#include "base/json/json_writer.h"
+#include <stdint.h>
+
#include <cmath>
+#include <limits>
#include "base/json/string_escape.h"
#include "base/logging.h"
@@ -79,10 +82,10 @@ bool JSONWriter::BuildJSONString(const Value& node, size_t depth) {
bool result = node.GetAsDouble(&value);
DCHECK(result);
if (omit_double_type_preservation_ &&
- value <= kint64max &&
- value >= kint64min &&
+ value <= std::numeric_limits<int64_t>::max() &&
+ value >= std::numeric_limits<int64_t>::min() &&
std::floor(value) == value) {
- json_string_->append(Int64ToString(static_cast<int64>(value)));
+ json_string_->append(Int64ToString(static_cast<int64_t>(value)));
return result;
}
std::string real = DoubleToString(value);