Better than: if ((variable == true) != false) ...
new_edge(src->id(), dst->id(), new_extended_route(hierarchy_, gw_src, gw_dst, link_list, true));
- if (symmetrical == true)
+ if (symmetrical)
new_edge(dst->id(), src->id(), new_extended_route(hierarchy_, gw_dst, gw_src, link_list, false));
}
TO_FLOYD_PRED(src->id(), dst->id()) = src->id();
TO_FLOYD_COST(src->id(), dst->id()) = (TO_FLOYD_LINK(src->id(), dst->id()))->link_list.size();
- if (symmetrical == true) {
+ if (symmetrical) {
if (gw_dst) // netzone route (to adapt the error message, if any)
xbt_assert(
nullptr == TO_FLOYD_LINK(dst->id(), src->id()),
/* Add the route to the base */
TO_ROUTE_FULL(src->id(), dst->id()) = new_extended_route(hierarchy_, gw_src, gw_dst, link_list, true);
- if (symmetrical == true && src != dst) {
+ if (symmetrical && src != dst) {
if (gw_dst && gw_src) {
NetPoint* gw_tmp = gw_src;
gw_src = gw_dst;
// Load the copy and resolve the entry point:
void* handle = dlopen(target_executable.c_str(), RTLD_LAZY | RTLD_LOCAL | WANT_RTLD_DEEPBIND);
int saved_errno = errno;
- if (simgrid::config::get_value<bool>("smpi/keep-temps") == false) {
+ if (not simgrid::config::get_value<bool>("smpi/keep-temps")) {
unlink(target_executable.c_str());
for (const std::string& target_lib : target_libs)
unlink(target_lib.c_str());
void Op::unref(MPI_Op* op){
if((*op)!=MPI_OP_NULL){
(*op)->refcount_--;
- if((*op)->refcount_==0 && (*op)->predefined_==false)
+ if ((*op)->refcount_ == 0 && not (*op)->predefined_)
delete(*op);
}
}
void NetworkWifiLink::set_host_rate(const s4u::Host* host, int rate_level)
{
auto insert_done = host_rates_.insert(std::make_pair(host->get_name(), rate_level));
- if (insert_done.second == false)
+ if (not insert_done.second)
insert_done.first->second = rate_level;
// Each time we add a host, we refresh the decay model
SgFlow* flow = getFlowFromSocket(socket);
XBT_DEBUG("received on F[%p, total: %u, remain: %u]", flow, flow->total_bytes_, flow->remaining_);
- if (flow->finished_ == false) {
+ if (not flow->finished_) {
flow->finished_ = true;
XBT_DEBUG("recv_cb of F[%p, %p, %u]", flow, flow->action_, flow->total_bytes_);
XBT_DEBUG("Stop simulator at %f seconds", ns3::Simulator::Now().GetSeconds());