Project

General

Profile

Feature #2224 ยป 0069-texaiplayer.c-Replace-NULL-with-nullptr.patch

Marko Lindqvist, 09/08/2026 07:52 PM

View differences:

ai/tex/texaiplayer.c
**************************************************************************/
void texai_map_alloc(void)
{
texai_send_msg(TEXAI_MSG_MAP_ALLOC, NULL, NULL);
texai_send_msg(TEXAI_MSG_MAP_ALLOC, nullptr, nullptr);
}
/**********************************************************************//**
......
**************************************************************************/
void texai_map_free(void)
{
texai_send_msg(TEXAI_MSG_MAP_FREE, NULL, NULL);
texai_send_msg(TEXAI_MSG_MAP_FREE, nullptr, nullptr);
}
/**********************************************************************//**
......
texai_city_worker_requests_create(ait, msg->plr, pcity);
texai_city_worker_wants(ait, msg->plr, pcity);
if (tex_city != NULL) {
if (tex_city != nullptr) {
choice = military_advisor_choose_build(ait, texai_map_get(),
msg->plr, tex_city,
texai_player_units);
......
} city_list_iterate_safe_end;
fc_mutex_release(&game.server.mutexes.city_list);
texai_send_req(TEXAI_REQ_TURN_DONE, msg->plr, NULL);
texai_send_req(TEXAI_REQ_TURN_DONE, msg->plr, nullptr);
break;
case TEXAI_MSG_TILE_INFO:
......
/* Default AI */
dai_data_close(ait, pplayer);
if (player_data != NULL) {
player_set_ai_data(pplayer, ait, NULL);
if (player_data != nullptr) {
player_set_ai_data(pplayer, ait, nullptr);
unit_list_destroy(player_data->units);
city_list_destroy(player_data->cities);
FC_FREE(player_data);
......
exthrai.num_players);
if (exthrai.num_players <= 0) {
texai_send_msg(TEXAI_MSG_THR_EXIT, pplayer, NULL);
texai_send_msg(TEXAI_MSG_THR_EXIT, pplayer, nullptr);
fc_thread_wait(&exthrai.ait);
exthrai.thread_running = FALSE;
......
= (struct texai_build_choice_req *)(req->data);
struct city *pcity = game_city_by_number(choice_req->city_id);
if (pcity != NULL && city_owner(pcity) == req->plr) {
if (pcity != nullptr && city_owner(pcity) == req->plr) {
adv_choice_copy(&(def_ai_city_data(pcity, ait)->choice),
&(choice_req->choice));
FC_FREE(choice_req);
    (1-1/1)