Project

General

Profile

Feature #1445 ยป 0081-citymap.c-Replace-NULL-with-nullptr.patch

Marko Lindqvist, 05/25/2025 09:29 AM

View differences:

common/aicore/citymap.c
* which has a negative value.
*/
static int *citymap = NULL;
static int *citymap = nullptr;
#define log_citymap log_debug
......
pcenter, ptile) {
struct city *pwork = tile_worked(ptile);
if (NULL != pwork) {
if (pwork != nullptr) {
citymap[tile_index(ptile)] = -(pwork->id);
} else {
citymap[tile_index(ptile)]++;
citymap[tile_index(ptile)]++;
}
} city_tile_iterate_end;
} city_list_iterate_end;
......
**************************************************************************/
void citymap_free(void)
{
if (citymap != NULL) {
if (citymap != nullptr) {
FC_FREE(citymap);
}
}
......
**************************************************************************/
bool citymap_is_reserved(struct tile *ptile)
{
if (NULL != tile_worked(ptile) /*|| tile_city(ptile)*/) {
if (tile_worked(ptile) != nullptr /*|| tile_city(ptile)*/ ) {
return TRUE;
}
return (citymap[tile_index(ptile)] < 0);
}
    (1-1/1)