mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-09-21 06:12:56 -04:00
Revert "Revert "newer standards prefer nullptr over NULL - this is most of them but there are others too""
This reverts commit 8e2160f33e.
This commit is contained in:
@@ -124,7 +124,7 @@ int InputFileHandler::deleteFile(
|
||||
if (deleteHandleFlag && file)
|
||||
{
|
||||
delete file;
|
||||
file = NULL;
|
||||
file = nullptr;
|
||||
}
|
||||
return(unlink(filename));
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
OutputFileHandler::OutputFileHandler(const char *filename)
|
||||
{
|
||||
outputIFF = new Iff(MAXIFFDATASIZE);
|
||||
outFilename = NULL;
|
||||
outFilename = nullptr;
|
||||
|
||||
setCurrentFilename(filename);
|
||||
}
|
||||
@@ -45,7 +45,7 @@ OutputFileHandler::~OutputFileHandler(void)
|
||||
delete [] outFilename;
|
||||
}
|
||||
|
||||
outputIFF = NULL;
|
||||
outputIFF = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
//================================================= static vars assignment ==
|
||||
const int entryPointVersion = 1; // constantly check DataEntryPoint.h to see if this value has changed
|
||||
|
||||
OutputFileHandler *outfileHandler = NULL;
|
||||
OutputFileHandler *outfileHandler = nullptr;
|
||||
const int bufferSize = 16 * 1024 * 1024;
|
||||
const int maxStringSize = 256;
|
||||
const char version[] = "1.3 September 18, 2000";
|
||||
@@ -242,7 +242,7 @@ int main( int argc, // number of args in commandline
|
||||
//
|
||||
static void callbackFunction(void)
|
||||
{
|
||||
outfileHandler = NULL;
|
||||
outfileHandler = nullptr;
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
@@ -392,13 +392,13 @@ static errorType evaluateArgs(void)
|
||||
|
||||
// get default values from DOS
|
||||
char currentDir[maxStringSize];
|
||||
if (NULL == getcwd(currentDir, maxStringSize)) // get current working directory
|
||||
if (nullptr == getcwd(currentDir, maxStringSize)) // get current working directory
|
||||
{
|
||||
retVal = ERR_UNKNOWNDIR;
|
||||
return(retVal);
|
||||
}
|
||||
drive[0] = currentDir[0]; // drive letter
|
||||
drive[1] = 0; // and null terminate it
|
||||
drive[1] = 0; // and nullptr terminate it
|
||||
strcpy(extension, "IFF"); // default to uppercase .IFF
|
||||
strcpy(directory, ¤tDir[2]); // get everything after the Drive: including the first backslash
|
||||
filename[0] = 0;
|
||||
@@ -619,7 +619,7 @@ static errorType loadInputToBuffer(
|
||||
// we've successfully read the file, now close it...
|
||||
delete inFileHandler;
|
||||
}
|
||||
else // inFileName is NULL
|
||||
else // inFileName is nullptr
|
||||
{
|
||||
retVal = ERR_FILENOTFOUND;
|
||||
}
|
||||
@@ -746,7 +746,7 @@ static void handleError(errorType error)
|
||||
// Revisions and History:
|
||||
// 1/07/99 [] - created
|
||||
//
|
||||
extern "C" void MIFFMessage(char *message, // null terminated string to be displayed
|
||||
extern "C" void MIFFMessage(char *message, // nullptr terminated string to be displayed
|
||||
int forceOutput) // if non-zero, it will print out even in quiet mode (for ERRORs)
|
||||
{
|
||||
if (forceOutput)
|
||||
|
||||
Reference in New Issue
Block a user