summaryrefslogtreecommitdiff
path: root/src/airport.cpp
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-04-10 22:07:06 +0100
committerMichael Lutz <michi@icosahedron.de>2019-04-10 23:22:20 +0200
commit7c8e7c6b6e16d4a26259a676db32d8776b99817e (patch)
tree99f134b7e66367cf11e10bc5061896eab4a3264f /src/airport.cpp
parent3b4f224c0bc50e7248050d4bcbb6d83fd510c1cc (diff)
downloadopenttd-7c8e7c6b6e16d4a26259a676db32d8776b99817e.tar.xz
Codechange: Use null pointer literal instead of the NULL macro
Diffstat (limited to 'src/airport.cpp')
-rw-r--r--src/airport.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/airport.cpp b/src/airport.cpp
index 7985e017a..15e18035f 100644
--- a/src/airport.cpp
+++ b/src/airport.cpp
@@ -46,7 +46,7 @@
* @param delta_z Height of the airport above the land.
*/
#define HELIPORT(name, num_helipads, delta_z) \
- AIRPORT_GENERIC(name, NULL, num_helipads, AirportFTAClass::HELICOPTERS, delta_z)
+ AIRPORT_GENERIC(name, nullptr, num_helipads, AirportFTAClass::HELICOPTERS, delta_z)
AIRPORT(country, 0, true)
AIRPORT(city, 0, false)
@@ -58,7 +58,7 @@ HELIPORT(helidepot, 1, 0)
AIRPORT(intercontinental, 2, false)
HELIPORT(helistation, 3, 0)
HELIPORT(oilrig, 1, 54)
-AIRPORT_GENERIC(dummy, NULL, 0, AirportFTAClass::ALL, 0)
+AIRPORT_GENERIC(dummy, nullptr, 0, AirportFTAClass::ALL, 0)
#undef HELIPORT
#undef AIRPORT
@@ -135,7 +135,7 @@ AirportFTAClass::~AirportFTAClass()
{
for (uint i = 0; i < nofelements; i++) {
AirportFTA *current = layout[i].next;
- while (current != NULL) {
+ while (current != nullptr) {
AirportFTA *next = current->next;
free(current);
current = next;
@@ -195,7 +195,7 @@ static AirportFTA *AirportBuildAutomata(uint nofelements, const AirportFTAbuildu
current = current->next;
internalcounter++;
}
- current->next = NULL;
+ current->next = nullptr;
internalcounter++;
}
return FAutomata;