Feature #2028 ยป 0041-multipliers.c-Replace-NULL-with-nullptr.patch
| common/multipliers.c | ||
|---|---|---|
|
name_init(&multipliers[i].name);
|
||
|
requirement_vector_init(&multipliers[i].reqs);
|
||
|
multipliers[i].ruledit_disabled = FALSE;
|
||
|
multipliers[i].helptext = NULL;
|
||
|
multipliers[i].helptext = nullptr;
|
||
|
}
|
||
|
}
|
||
| ... | ... | |
|
requirement_vector_free(&(pmul->reqs));
|
||
|
if (pmul->helptext) {
|
||
|
strvec_destroy(pmul->helptext);
|
||
|
pmul->helptext = NULL;
|
||
|
pmul->helptext = nullptr;
|
||
|
}
|
||
|
} multipliers_iterate_end;
|
||
|
}
|
||
| ... | ... | |
|
****************************************************************************/
|
||
|
struct multiplier *multiplier_by_number(Multiplier_type_id id)
|
||
|
{
|
||
|
fc_assert_ret_val(id >= 0 && id < game.control.num_multipliers, NULL);
|
||
|
fc_assert_ret_val(id >= 0 && id < game.control.num_multipliers, nullptr);
|
||
|
return &multipliers[id];
|
||
|
}
|
||
| ... | ... | |
|
****************************************************************************/
|
||
|
Multiplier_type_id multiplier_number(const struct multiplier *pmul)
|
||
|
{
|
||
|
fc_assert_ret_val(NULL != pmul, -1);
|
||
|
fc_assert_ret_val(pmul != nullptr, -1);
|
||
|
return pmul - multipliers;
|
||
|
}
|
||
| ... | ... | |
|
}
|
||
|
/************************************************************************//**
|
||
|
Returns multiplier matching rule name, or NULL if there is no multiplier
|
||
|
Returns multiplier matching rule name, or nullptr if there is no multiplier
|
||
|
with such a name.
|
||
|
****************************************************************************/
|
||
|
struct multiplier *multiplier_by_rule_name(const char *name)
|
||
|
{
|
||
|
const char *qs;
|
||
|
if (name == NULL) {
|
||
|
return NULL;
|
||
|
if (name == nullptr) {
|
||
|
return nullptr;
|
||
|
}
|
||
|
qs = Qn_(name);
|
||
| ... | ... | |
|
}
|
||
|
} multipliers_iterate_end;
|
||
|
return NULL;
|
||
|
return nullptr;
|
||
|
}
|
||
|
/************************************************************************//**
|
||
| ... | ... | |
|
}
|
||
|
return are_reqs_active(&(const struct req_context) { .player = pplayer },
|
||
|
NULL, &pmul->reqs, RPT_CERTAIN);
|
||
|
nullptr, &pmul->reqs, RPT_CERTAIN);
|
||
|
}
|
||