Project

General

Profile

Feature #1491 ยป 0084-api_game_effects.c-Replace-NULL-with-nullptr.patch

Marko Lindqvist, 06/08/2025 04:08 AM

View differences:

common/scriptcore/api_game_effects.c
return 0;
}
return get_target_bonus_effects(NULL,
return get_target_bonus_effects(nullptr,
&(const struct req_context) {
.player = unit_owner(punit),
.city = unit_tile(punit)
? tile_city(unit_tile(punit)) : NULL,
? tile_city(unit_tile(punit)) : nullptr,
.tile = unit_tile(punit),
.unit = punit,
.unittype = unit_type_get(punit),
......
const char *output_id, const char *effect_type)
{
const struct player *pplayer;
const struct output_type *poutput = NULL;
const struct output_type *poutput = nullptr;
enum effect_type etype;
LUASCRIPT_CHECK_STATE(L, 0);
......
return 0;
}
if (output_id != NULL) {
if (output_id != nullptr) {
enum output_type_id id = output_type_by_identifier(output_id);
if (id != O_LAST) {
......
}
}
pplayer = (pcity != NULL ? city_owner(pcity) : NULL);
pplayer = (pcity != nullptr ? city_owner(pcity) : nullptr);
return get_target_bonus_effects(NULL,
return get_target_bonus_effects(nullptr,
&(const struct req_context) {
.player = pplayer,
.city = pcity,
.tile = ptile,
.output = poutput,
},
NULL,
nullptr,
etype);
}
......
return 0;
}
if (output_id != NULL) {
if (output_id != nullptr) {
enum output_type_id id = output_type_by_identifier(output_id);
if (O_LAST == id){
    (1-1/1)