Feature #1680 ยป 0016-unitlist.-ch-Replace-NULL-with-nullptr.patch
common/unitlist.c | ||
---|---|---|
#include "unitlist.h"
|
||
/************************************************************************//**
|
||
Look for a unit with the given ID in the unit list. Returns NULL if none
|
||
Look for a unit with the given ID in the unit list. Returns nullptr if none
|
||
is found.
|
||
****************************************************************************/
|
||
struct unit *unit_list_find(const struct unit_list *punitlist, int unit_id)
|
||
... | ... | |
}
|
||
} unit_list_iterate_end;
|
||
return NULL;
|
||
return nullptr;
|
||
}
|
||
/************************************************************************//**
|
common/unitlist.h | ||
---|---|---|
struct unit *_unit = \
|
||
game_unit_by_number(_unit##_numbers[_unit##_index]); \
|
||
\
|
||
if (NULL != _unit) {
|
||
if (_unit != nullptr) {
|
||
#define unit_list_iterate_safe_end \
|
||
} \
|