refactor(date): Use single stringstream

Reduces code repetition and removes the need for setting the locale in
every update
This commit is contained in:
patrick96
2017-09-15 14:21:38 +02:00
parent 6e9e739d81
commit 1bc9933a88
2 changed files with 12 additions and 16 deletions

View File

@ -37,9 +37,10 @@ namespace modules {
string m_date;
string m_time;
std::atomic<bool> m_toggled{false};
// Single stringstream to be used to gather the results of std::put_time
std::stringstream datetime_stream;
void set_stream_locale(std::stringstream &stream);
std::atomic<bool> m_toggled{false};
};
}