Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Constify pointer and reference local variables in src/s4u/.
[simgrid.git] / src / s4u / s4u_Comm.cpp
index 98965dc..9b9ac8b 100644 (file)
@@ -20,10 +20,11 @@ xbt::signal<void(Actor const&)> Comm::on_completion;
 
 Comm::~Comm()
 {
-  if (state_ == State::STARTED && not detached_ && (pimpl_ == nullptr || pimpl_->state_ == SIMIX_RUNNING)) {
+  if (state_ == State::STARTED && not detached_ &&
+      (pimpl_ == nullptr || pimpl_->state_ == kernel::activity::State::RUNNING)) {
     XBT_INFO("Comm %p freed before its completion. Detached: %d, State: %d", this, detached_, (int)state_);
     if (pimpl_ != nullptr)
-      XBT_INFO("pimpl_->state: %d", pimpl_->state_);
+      XBT_INFO("pimpl_->state: %d", static_cast<int>(pimpl_->state_));
     else
       XBT_INFO("pimpl_ is null");
     xbt_backtrace_display_current();