mirror of
https://github.com/polybar/polybar.git
synced 2026-05-13 09:43:30 +00:00
refactor(date): Use single stringstream
Reduces code repetition and removes the need for setting the locale in every update
This commit is contained in:
@ -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};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user