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

@@ -49,7 +49,7 @@ StringID RemapOldStringID(StringID s)
}
/** Location to load the old names to. */
char *_old_name_array = NULL;
char *_old_name_array = nullptr;
/**
* Copy and convert old custom names to UTF-8.
@@ -61,7 +61,7 @@ char *_old_name_array = NULL;
char *CopyFromOldName(StringID id)
{
/* Is this name an (old) custom name? */
if (GetStringTab(id) != TEXT_TAB_OLD_CUSTOM) return NULL;
if (GetStringTab(id) != TEXT_TAB_OLD_CUSTOM) return nullptr;
if (IsSavegameVersionBefore(SLV_37)) {
/* Allow for expansion when converted to UTF-8. */
@@ -109,7 +109,7 @@ char *CopyFromOldName(StringID id)
void ResetOldNames()
{
free(_old_name_array);
_old_name_array = NULL;
_old_name_array = nullptr;
}
/**
@@ -140,5 +140,5 @@ static void Load_NAME()
/** Chunk handlers related to strings. */
extern const ChunkHandler _name_chunk_handlers[] = {
{ 'NAME', NULL, Load_NAME, NULL, NULL, CH_ARRAY | CH_LAST},
{ 'NAME', nullptr, Load_NAME, nullptr, nullptr, CH_ARRAY | CH_LAST},
};