cat->layout = nullptr;
}
- for (auto const* child = cat->firstChild; child != nullptr; child = child->nextSibling)
- log_cat_exit(const_cast<xbt_log_category_t>(child));
+ for (auto* child = cat->firstChild; child != nullptr; child = child->nextSibling)
+ log_cat_exit(child);
cat->firstChild = nullptr;
}
return priority >= category->threshold;
static std::recursive_mutex log_cat_init_mutex;
- log_cat_init_mutex.lock();
+ const std::scoped_lock lock(log_cat_init_mutex);
XBT_DEBUG("Initializing category '%s' (firstChild=%s, nextSibling=%s)", category->name,
(category->firstChild ? category->firstChild->name : "none"),
}
category->initialized = 1;
- log_cat_init_mutex.unlock();
return priority >= category->threshold;
}