Fix error with time quantizer string conversion

Fix error with uninitialized memory in GlobeBrowsing
Remove dynamic memory allocation from on-screen rendering
This commit is contained in:
Alexander Bock
2020-08-14 14:10:54 +02:00
parent 5091fa7ddb
commit 97811d82d0
23 changed files with 256 additions and 135 deletions
+6 -6
View File
@@ -158,12 +158,12 @@ void DateTime::setTime(std::string_view input) {
constexpr const size_t IndexMinute = 14;
constexpr const size_t IndexSecond = 17;
std::from_chars(input.data() + IndexYear, input.data() + 4, _year);
std::from_chars(input.data() + IndexMonth, input.data() + 2, _month);
std::from_chars(input.data() + IndexDay, input.data() + 2, _day);
std::from_chars(input.data() + IndexHour, input.data() + 2, _hour);
std::from_chars(input.data() + IndexMinute, input.data() + 2, _minute);
std::from_chars(input.data() + IndexSecond, input.data() + 2, _second);
std::from_chars(input.data() + IndexYear, input.data() + IndexYear + 4, _year);
std::from_chars(input.data() + IndexMonth, input.data() + IndexMonth + 2, _month);
std::from_chars(input.data() + IndexDay, input.data() + IndexDay + 2, _day);
std::from_chars(input.data() + IndexHour, input.data() + IndexHour + 2, _hour);
std::from_chars(input.data() + IndexMinute, input.data() + IndexMinute + 2, _minute);
std::from_chars(input.data() + IndexSecond, input.data() + IndexSecond + 2, _second);
}
std::string DateTime::ISO8601() const {