From ee2e68f44f7b9ee099f98b668257b5d57a86a695 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 10 Aug 2021 18:14:30 +0100 Subject: Enable numeric conversion warning and fix the fallout --- lib/input/mysqlBindings.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/input') diff --git a/lib/input/mysqlBindings.h b/lib/input/mysqlBindings.h index 3d1ad7f..36ef2bf 100644 --- a/lib/input/mysqlBindings.h +++ b/lib/input/mysqlBindings.h @@ -159,11 +159,15 @@ namespace MyGrate::Input { private: operator Date() const { - return Date(buf.year, buf.month, buf.day); + return Date(boost::numeric_cast(buf.year), + boost::numeric_cast(buf.month), + boost::numeric_cast(buf.day)); } operator Time() const { - return Time(buf.hour, buf.minute, buf.second); + return Time(boost::numeric_cast(buf.hour), + boost::numeric_cast(buf.minute), + boost::numeric_cast(buf.second)); } operator DateTime() const { -- cgit v1.2.3