Skip to content

Commit 050eacf

Browse files
authored
Initialize std::tm properly in isoStringToTm (#4898)
# Description Resolves #X Initialize std::tm properly in isoStringToTm. # Checklist - [ ] Reviewed the [contributing](https://github.com/stellar/stellar-core/blob/master/CONTRIBUTING.md#submitting-changes) document - [ ] Rebased on top of master (no merge commits) - [ ] Ran `clang-format` v8.0.0 (via `make format` or the Visual Studio extension) - [ ] Compiles - [ ] Ran all tests - [ ] If change impacts performance, include supporting evidence per the [performance document](https://github.com/stellar/stellar-core/blob/master/performance-eval/performance-eval.md)
2 parents c16db5c + 68436df commit 050eacf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/Timer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ VirtualClock::tmToSystemPoint(tm t)
156156
std::tm
157157
VirtualClock::isoStringToTm(std::string const& iso)
158158
{
159-
std::tm res;
159+
std::tm res{};
160160
std::istringstream ss(iso);
161161
ss >> std::get_time(&res, "%Y-%m-%dT%H:%M:%SZ");
162162
if (!ss)

0 commit comments

Comments
 (0)