From 57e470513b47cf9a37db429e7f33ca904e8136c2 Mon Sep 17 00:00:00 2001 From: garethsb-sony Date: Tue, 22 Jan 2019 12:43:15 +0000 Subject: [PATCH] [#47] Suppress "warning C4244: 'argument': conversion from '__int64' to 'double', possible loss of data" from Visual Studio --- src/json-validator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/json-validator.cpp b/src/json-validator.cpp index 159f999..80c23db 100644 --- a/src/json-validator.cpp +++ b/src/json-validator.cpp @@ -591,8 +591,8 @@ class numeric : public schema std::pair multipleOf_{false, 0}; - // multipleOf - if the rest of the division is 0 -> OK - bool violates_multiple_of(json::number_float_t x) const + // multipleOf - if the remainder of the division is 0 -> OK + bool violates_multiple_of(T x) const { json::number_integer_t n = static_cast(x / multipleOf_.second); double res = (x - n * multipleOf_.second);