diff options
author | Henry Wilson <m3henry@googlemail.com> | 2019-04-10 22:07:06 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2019-04-10 23:22:20 +0200 |
commit | 7c8e7c6b6e16d4a26259a676db32d8776b99817e (patch) | |
tree | 99f134b7e66367cf11e10bc5061896eab4a3264f /src/ground_vehicle.hpp | |
parent | 3b4f224c0bc50e7248050d4bcbb6d83fd510c1cc (diff) | |
download | openttd-7c8e7c6b6e16d4a26259a676db32d8776b99817e.tar.xz |
Codechange: Use null pointer literal instead of the NULL macro
Diffstat (limited to 'src/ground_vehicle.hpp')
-rw-r--r-- | src/ground_vehicle.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ground_vehicle.hpp b/src/ground_vehicle.hpp index 25106ab1c..109257fe2 100644 --- a/src/ground_vehicle.hpp +++ b/src/ground_vehicle.hpp @@ -102,7 +102,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); } @@ -117,7 +117,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)) { |