Project

General

Profile

Feature #2033 ยป 0040-diptreaty.c-Replace-NULL-with-nullptr.patch

Marko Lindqvist, 05/20/2026 06:35 AM

View differences:

common/diptreaty.c
static struct clause_info clause_infos[CLAUSE_COUNT];
static struct treaty_list *treaties = NULL;
static struct treaty_list *treaties = nullptr;
/**********************************************************************//**
Returns TRUE iff pplayer could do diplomacy in the game at all.
......
/* Leave it to the server to decide if the other party can meet
* the requirements. */
if (client_player == NULL || client_player == pfrom) {
if (client_player == nullptr || client_player == pfrom) {
if (!are_reqs_active(&(const struct req_context) { .player = pfrom },
&(const struct req_context) { .player = pto },
&clause_infos[type].giver_reqs, RPT_POSSIBLE)) {
return FALSE;
}
}
if (client_player == NULL || client_player == pto) {
if (client_player == nullptr || client_player == pto) {
if (!are_reqs_active(&(const struct req_context) { .player = pto },
&(const struct req_context) { .player = pfrom },
&clause_infos[type].receiver_reqs,
......
return FALSE;
}
}
if (client_player == NULL) {
if (client_player == nullptr) {
if (!are_reqs_active(&(const struct req_context) { .player = pfrom },
&(const struct req_context) { .player = pto },
&clause_infos[type].either_reqs,
......
free_treaties();
treaty_list_destroy(treaties);
treaties = NULL;
treaties = nullptr;
}
/**********************************************************************//**
......
}
} treaty_list_iterate_end;
return NULL;
return nullptr;
}
/**********************************************************************//**
    (1-1/1)