Codechange: Don't keep autosave_interval in std::chrono::minutes.

This variable is saved as a setting which requires the variable type to be known, but std::chrono::minutes may vary depending on system type.

Instead, keep as uint32_t and convert to std::chrono::minutes only when setting the timer.
This commit is contained in:
Peter Nelson
2023-12-07 19:27:00 +00:00
committed by Peter Nelson
parent a29766d6cc
commit 54d45a6047
4 changed files with 13 additions and 13 deletions

View File

@@ -60,12 +60,12 @@ static const StringID _autosave_dropdown[] = {
};
/** Available settings for autosave intervals. */
static const std::chrono::minutes _autosave_dropdown_to_minutes[] = {
std::chrono::minutes::zero(), ///< never
std::chrono::minutes(10),
std::chrono::minutes(30),
std::chrono::minutes(60),
std::chrono::minutes(120),
static const uint32_t _autosave_dropdown_to_minutes[] = {
0, ///< never
10,
30,
60,
120,
};
static Dimension _circle_size; ///< Dimension of the circle +/- icon. This is here as not all users are within the class of the settings window.