From b845cf756c3d86ee703597c8f1217c87713ea2a1 Mon Sep 17 00:00:00 2001 From: vaclavt Date: Mon, 28 Feb 2022 19:48:27 +0100 Subject: [PATCH] constexpr instead const --- ml_date.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml_date.cpp b/ml_date.cpp index ee0304f..2350e4e 100644 --- a/ml_date.cpp +++ b/ml_date.cpp @@ -33,7 +33,7 @@ std::string date_to_string(const long datetime, const std::string& format) { } time_t time_to_epoch ( const struct tm *ltm, int utcdiff ) { - const int mon_days [] = {0, 31, 31+28, 31+28+31, + constexpr int mon_days [] = {0, 31, 31+28, 31+28+31, 31+28+31+30, 31+28+31+30+31, 31+28+31+30+31+30, 31+28+31+30+31+30+31, 31+28+31+30+31+30+31+31, 31+28+31+30+31+30+31+31+30, 31+28+31+30+31+30+31+31+30+31, 31+28+31+30+31+30+31+31+30+31+30, 31+28+31+30+31+30+31+31+30+31+30+31};