From b09afb88062cb476acfbd0e569fe961f406846a3 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 18 May 2021 00:50:24 +0100 Subject: Default intialize structs --- lib/mysql_types.cpp | 6 +++--- 1 file 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::read(RawDataReader &, RawDataReader & data) { auto dtint {data.readValue()}; - 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::read(RawDataReader &, RawDataReader & data) { auto tint {data.readValue()}; - 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::read(RawDataReader &, RawDataReader & data) { auto dint {data.readValue()}; - Date d; + Date d {}; d.day = bitslice(dint, 0, 6); d.month = bitslice(dint, 6, 4); d.year = bitslice(dint, 10, 14); -- cgit v1.2.3