From d4982fe118643885f02028c442d8608abdbb4127 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 25 Apr 2022 14:28:10 +0200 Subject: [PATCH] Define as "constexpr". --- src/plugins/host_dvfs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/host_dvfs.cpp b/src/plugins/host_dvfs.cpp index c6cf779144..e9099cd508 100644 --- a/src/plugins/host_dvfs.cpp +++ b/src/plugins/host_dvfs.cpp @@ -52,10 +52,10 @@ static simgrid::config::Flag cfg_min_pstate("plugin/dvfs/min-pstate", "Which pstate is the minimum (and hence fastest) pstate for this governor?", 0); -static const int max_pstate_not_limited = -1; +static constexpr int MAX_PSTATE_NOT_LIMITED = -1; static simgrid::config::Flag cfg_max_pstate("plugin/dvfs/max-pstate", - "Which pstate is the maximum (and hence slowest) pstate for this governor?", max_pstate_not_limited); + "Which pstate is the maximum (and hence slowest) pstate for this governor?", MAX_PSTATE_NOT_LIMITED); /** @addtogroup SURF_plugin_load @@ -98,7 +98,7 @@ public: explicit Governor(simgrid::s4u::Host* ptr) : host_(ptr) { - if (cfg_max_pstate == max_pstate_not_limited) + if (cfg_max_pstate == MAX_PSTATE_NOT_LIMITED) max_pstate = host_->get_pstate_count() - 1; init(); } -- 2.30.2