Feature #1445 ยป 0081-citymap.c-Replace-NULL-with-nullptr.patch
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);
|
||
}
|