diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-08-10 18:14:30 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-08-10 18:14:30 +0100 |
commit | ee2e68f44f7b9ee099f98b668257b5d57a86a695 (patch) | |
tree | d7593729cdb2dcad097c7a801f0c39c8d59381c0 /lib/input | |
parent | Tests, fixes, improvements to WritePqCopyStream (diff) | |
download | mygrate-ee2e68f44f7b9ee099f98b668257b5d57a86a695.tar.bz2 mygrate-ee2e68f44f7b9ee099f98b668257b5d57a86a695.tar.xz mygrate-ee2e68f44f7b9ee099f98b668257b5d57a86a695.zip |
Enable numeric conversion warning and fix the fallout
Diffstat (limited to 'lib/input')
-rw-r--r-- | lib/input/mysqlBindings.h | 8 |
1 files changed, 6 insertions, 2 deletions
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<decltype(Date::year)>(buf.year), + boost::numeric_cast<decltype(Date::month)>(buf.month), + boost::numeric_cast<decltype(Date::day)>(buf.day)); } operator Time() const { - return Time(buf.hour, buf.minute, buf.second); + return Time(boost::numeric_cast<decltype(Time::hour)>(buf.hour), + boost::numeric_cast<decltype(Time::minute)>(buf.minute), + boost::numeric_cast<decltype(Time::second)>(buf.second)); } operator DateTime() const { |