From 2c1bb6f03288405a3798bfb7498dbf9012382a50 Mon Sep 17 00:00:00 2001 From: Tommaso Pecorella Date: Sat, 22 Oct 2022 14:29:33 +0200 Subject: [PATCH] core:fix int->double conversion in Time --- src/core/model/time.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/model/time.cc b/src/core/model/time.cc index cda965edd..a1b389ba8 100644 --- a/src/core/model/time.cc +++ b/src/core/model/time.cc @@ -247,7 +247,8 @@ Time::SetResolution(enum Unit unit, struct Resolution* resolution, const bool co << quotient); struct Information* info = &resolution->info[i]; - if (std::pow(10, std::fabs(shift)) * quotient > std::numeric_limits::max()) + if ((std::pow(10, std::fabs(shift)) * quotient) > + static_cast(std::numeric_limits::max())) { NS_LOG_DEBUG("SetResolution for unit " << (int)unit << " loop iteration " << i << " marked as INVALID");