diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-05-18 00:50:24 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-05-18 00:50:24 +0100 |
commit | b09afb88062cb476acfbd0e569fe961f406846a3 (patch) | |
tree | 2761a0cc3863bcb64b9cc85a7a5b801d82ca408c /lib | |
parent | Force clang-12 (diff) | |
download | mygrate-b09afb88062cb476acfbd0e569fe961f406846a3.tar.bz2 mygrate-b09afb88062cb476acfbd0e569fe961f406846a3.tar.xz mygrate-b09afb88062cb476acfbd0e569fe961f406846a3.zip |
Default intialize structs
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mysql_types.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/mysql_types.cpp b/lib/mysql_types.cpp index 7c530a7..b61de08 100644 --- a/lib/mysql_types.cpp +++ b/lib/mysql_types.cpp @@ -132,7 +132,7 @@ namespace MyGrate::MySQL { Type<MYSQL_TYPE_DATETIME>::read(RawDataReader &, RawDataReader & data) { auto dtint {data.readValue<uint64_t>()}; - DateTime dt; + DateTime dt {}; dt.second = mod100_extract(dtint); dt.minute = mod100_extract(dtint); dt.hour = mod100_extract(dtint); @@ -146,7 +146,7 @@ namespace MyGrate::MySQL { Type<MYSQL_TYPE_TIME>::read(RawDataReader &, RawDataReader & data) { auto tint {data.readValue<uint32_t, 3>()}; - Time t; + Time t {}; t.second = mod100_extract(tint); t.minute = mod100_extract(tint); t.hour = tint; @@ -163,7 +163,7 @@ namespace MyGrate::MySQL { Type<MYSQL_TYPE_DATE>::read(RawDataReader &, RawDataReader & data) { auto dint {data.readValue<uint32_t, 3>()}; - Date d; + Date d {}; d.day = bitslice(dint, 0, 6); d.month = bitslice(dint, 6, 4); d.year = bitslice(dint, 10, 14); |