From 99d0baed2fa30e1836755355255b5c3b9449cdec Mon Sep 17 00:00:00 2001 From: ambiennt <63216972+ambiennt@users.noreply.github.com> Date: Wed, 16 Apr 2025 21:17:03 -0700 Subject: [PATCH] Fix C4244 Warning --- include/jwt-cpp/jwt.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/jwt-cpp/jwt.h b/include/jwt-cpp/jwt.h index 41ef65797..2f59e4a9a 100644 --- a/include/jwt-cpp/jwt.h +++ b/include/jwt-cpp/jwt.h @@ -2625,15 +2625,15 @@ namespace jwt { /** * \brief Get the contained JSON value as a date * - * If the value is a decimal, it is rounded up to the closest integer + * If the value is a decimal, it is rounded to the closest integer * * \return content as date * \throw std::bad_cast Content was not a date */ date as_date() const { using std::chrono::system_clock; - if (get_type() == json::type::number) return system_clock::from_time_t(std::round(as_number())); - return system_clock::from_time_t(as_integer()); + if (get_type() == json::type::number) return system_clock::from_time_t(static_cast(std::round(as_number()))); + return system_clock::from_time_t(static_cast(as_integer())); } /**