From: Arnaud Giersch Date: Thu, 27 Oct 2022 11:23:40 +0000 (+0200) Subject: Remove redundant cast (Sonar). X-Git-Tag: v3.34~731 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2b6d9ffb6542c036c34f11616ffd1861deaca9d0 Remove redundant cast (Sonar). --- diff --git a/src/kernel/actor/SimcallObserver.cpp b/src/kernel/actor/SimcallObserver.cpp index 294fc3a645..88428f1b0f 100644 --- a/src/kernel/actor/SimcallObserver.cpp +++ b/src/kernel/actor/SimcallObserver.cpp @@ -57,6 +57,6 @@ bool ActorJoinSimcall::is_enabled() void ActorJoinSimcall::serialize(std::stringstream& stream) const { stream << (short)mc::Transition::Type::ACTOR_JOIN << ' '; - stream << other_->get_pid() << ' ' << static_cast(timeout_ > 0); + stream << other_->get_pid() << ' ' << (timeout_ > 0); } } // namespace simgrid::kernel::actor diff --git a/src/smpi/include/smpi_host.hpp b/src/smpi/include/smpi_host.hpp index 3defe11db0..938ee868ce 100644 --- a/src/smpi/include/smpi_host.hpp +++ b/src/smpi/include/smpi_host.hpp @@ -17,7 +17,7 @@ namespace simgrid::smpi { static auto factor_lambda(std::vector const& values, double size) { - return values[0] + values[1] * static_cast(size); + return values[0] + values[1] * size; } class Host { kernel::resource::FactorSet orecv_{"smpi/or", 0.0, factor_lambda};