Codechange: Use null pointer literal instead of the NULL macro

This commit is contained in:
Henry Wilson
2019-04-10 22:07:06 +01:00
committed by Michael Lutz
parent 3b4f224c0b
commit 7c8e7c6b6e
463 changed files with 5674 additions and 5674 deletions

View File

@@ -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;