Merge: Codechange: Use null pointer literal instead of the NULL macro

This commit is contained in:
Jonathan G Rennison
2019-04-11 18:14:13 +01:00
585 changed files with 6604 additions and 6604 deletions

View File

@@ -107,7 +107,7 @@ struct GroundVehicle : public SpecializedVehicle<T, Type> {
uint Crash(bool flooded) override
{
/* Crashed vehicles aren't going up or down */
for (T *v = T::From(this); v != NULL; v = v->Next()) {
for (T *v = T::From(this); v != nullptr; v = v->Next()) {
ClrBit(v->gv_flags, GVF_GOINGUP_BIT);
ClrBit(v->gv_flags, GVF_GOINGDOWN_BIT);
}
@@ -124,7 +124,7 @@ struct GroundVehicle : public SpecializedVehicle<T, Type> {
int64 incl = 0;
for (const T *u = T::From(this); u != NULL; u = u->Next()) {
for (const T *u = T::From(this); u != nullptr; u = u->Next()) {
if (HasBit(u->gv_flags, GVF_GOINGUP_BIT)) {
incl += u->gcache.cached_slope_resistance;
} else if (HasBit(u->gv_flags, GVF_GOINGDOWN_BIT)) {