From 2569a210f6736ac2e0d3baaa11aa90815998ff70 Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Sun, 29 Dec 2019 21:09:05 -0500 Subject: [PATCH] Factor out the real and default season lengths Pull these values out as global statics to make it clearer that the default season length is the real-world season length. --- src/calendar.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calendar.cpp b/src/calendar.cpp index d61aa0d11f5b4..e16a12b254b3c 100644 --- a/src/calendar.cpp +++ b/src/calendar.cpp @@ -449,15 +449,16 @@ void calendar::set_season_length( const int dur ) cur_season_length = dur; } +static constexpr int real_world_season_length = 91; +static constexpr int default_season_length = real_world_season_length; + float calendar::season_ratio() { - static const int real_world_season_length = 91; return to_days( season_length() ) / real_world_season_length; } float calendar::season_from_default_ratio() { - static const int default_season_length = 91; return to_days( season_length() ) / default_season_length; }