Feature #1716 ยป 0021-base.c-Replace-NULL-with-nullptr.patch
| common/base.c | ||
|---|---|---|
|
bases = extra_type_list_by_cause(EC_BASE);
|
||
|
if (bases == NULL || id < 0 || id >= extra_type_list_size(bases)) {
|
||
|
return NULL;
|
||
|
if (bases == nullptr || id < 0 || id >= extra_type_list_size(bases)) {
|
||
|
return nullptr;
|
||
|
}
|
||
|
return extra_base_get(extra_type_list_get(bases, id));
|
||
| ... | ... | |
|
****************************************************************************/
|
||
|
Base_type_id base_number(const struct base_type *pbase)
|
||
|
{
|
||
|
fc_assert_ret_val(NULL != pbase, -1);
|
||
|
fc_assert_ret_val(pbase != nullptr, -1);
|
||
|
return pbase->item_number;
|
||
|
}
|
||
| ... | ... | |
|
struct base_type *pbase = extra_base_get(pextra);
|
||
|
if (type == pbase->gui_type
|
||
|
&& (punit == NULL || can_build_base(punit, pbase, ptile))) {
|
||
|
&& (punit == nullptr || can_build_base(punit, pbase, ptile))) {
|
||
|
return pbase;
|
||
|
}
|
||
|
} extra_type_by_cause_iterate_end;
|
||
|
return NULL;
|
||
|
return nullptr;
|
||
|
}
|
||
|
/************************************************************************//**
|
||