Project

General

Profile

Feature #2019 ยป 0037-disaster.c-Replace-NULL-with-nullptr.patch

Marko Lindqvist, 05/07/2026 04:41 AM

View differences:

common/disaster.c
****************************************************************************/
Disaster_type_id disaster_number(const struct disaster_type *pdis)
{
fc_assert_ret_val(NULL != pdis, -1);
fc_assert_ret_val(pdis != nullptr, -1);
return pdis->id;
}
......
****************************************************************************/
Disaster_type_id disaster_index(const struct disaster_type *pdis)
{
fc_assert_ret_val(NULL != pdis, -1);
fc_assert_ret_val(pdis != nullptr, -1);
return pdis - disaster_types;
}
......
****************************************************************************/
struct disaster_type *disaster_by_number(Disaster_type_id id)
{
fc_assert_ret_val(id >= 0 && id < game.control.num_disaster_types, NULL);
fc_assert_ret_val(id >= 0 && id < game.control.num_disaster_types, nullptr);
return &disaster_types[id];
}
......
}
/************************************************************************//**
Return disaster matching rule name or NULL if there is no disaster
Return disaster matching rule name or nullptr if there is no disaster
with such a name.
****************************************************************************/
struct disaster_type *disaster_by_rule_name(const char *name)
......
}
} disaster_type_iterate_end;
return NULL;
return nullptr;
}
/************************************************************************//**
......
.city = pcity,
.tile = city_tile(pcity),
},
NULL,
nullptr,
&pdis->reqs, RPT_POSSIBLE);
}
    (1-1/1)