Skip to content

Commit

Permalink
Use constexpr instead of enum to eliminate warnings (#2144)
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes authored Jun 6, 2024
1 parent f485d52 commit a539819
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/solver/variable/include/antares/solver/variable/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,13 @@ namespace Solver
{
namespace Variable
{
enum Constant
{
maxHoursInAYear = 8785,
maxDaysInAYear = 7 * 53 + 1, // 366,
maxWeeksInAYear = 53,
maxHoursInADay = 24,
maxMonths = 12,
maxDaysInAWeek = 7,
maxHoursInAWeek = 24 * 7, // 168,
};
constexpr unsigned int maxHoursInAYear = 8785;
constexpr unsigned int maxDaysInAYear = 7 * 53 + 1; // 366,
constexpr unsigned int maxWeeksInAYear = 53;
constexpr unsigned int maxHoursInADay = 24;
constexpr unsigned int maxMonths = 12;
constexpr unsigned int maxDaysInAWeek = 7;
constexpr unsigned int maxHoursInAWeek = 24 * 7; // 168

template<int I>
struct PrecisionToPrintfFormat
Expand Down

0 comments on commit a539819

Please sign in to comment.