From 7c8e7c6b6e16d4a26259a676db32d8776b99817e Mon Sep 17 00:00:00 2001 From: Henry Wilson Date: Wed, 10 Apr 2019 22:07:06 +0100 Subject: Codechange: Use null pointer literal instead of the NULL macro --- src/airport.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/airport.cpp') 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; -- cgit v1.2.3-54-g00ecf