Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove redundant cast (Sonar).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 27 Oct 2022 11:23:40 +0000 (13:23 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 27 Oct 2022 12:23:41 +0000 (14:23 +0200)
src/kernel/actor/SimcallObserver.cpp
src/smpi/include/smpi_host.hpp

index 294fc3a..88428f1 100644 (file)
@@ -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<bool>(timeout_ > 0);
+  stream << other_->get_pid() << ' ' << (timeout_ > 0);
 }
 } // namespace simgrid::kernel::actor
index 3defe11..938ee86 100644 (file)
@@ -17,7 +17,7 @@
 namespace simgrid::smpi {
 static auto factor_lambda(std::vector<double> const& values, double size)
 {
-  return values[0] + values[1] * static_cast<size_t>(size);
+  return values[0] + values[1] * size;
 }
 class Host {
   kernel::resource::FactorSet orecv_{"smpi/or", 0.0, factor_lambda};