summaryrefslogtreecommitdiffstats
path: root/Source/cmHexFileConverter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmHexFileConverter.cxx')
-rw-r--r--Source/cmHexFileConverter.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/cmHexFileConverter.cxx b/Source/cmHexFileConverter.cxx
index 78dceb7..8deb8c1 100644
--- a/Source/cmHexFileConverter.cxx
+++ b/Source/cmHexFileConverter.cxx
@@ -2,7 +2,6 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmHexFileConverter.h"
-#include "cmConfigure.h"
#include <stdio.h>
#include <string.h>
@@ -22,7 +21,7 @@ static bool cm_IsHexChar(char c)
static unsigned int ChompStrlen(const char* line)
{
- if (line == CM_NULLPTR) {
+ if (line == nullptr) {
return 0;
}
unsigned int length = static_cast<unsigned int>(strlen(line));
@@ -139,7 +138,7 @@ cmHexFileConverter::FileType cmHexFileConverter::DetermineFileType(
{
char buf[1024];
FILE* inFile = cmsys::SystemTools::Fopen(inFileName, "rb");
- if (inFile == CM_NULLPTR) {
+ if (inFile == nullptr) {
return Binary;
}
@@ -188,11 +187,11 @@ bool cmHexFileConverter::TryConvert(const char* inFileName,
// try to open the file
FILE* inFile = cmsys::SystemTools::Fopen(inFileName, "rb");
FILE* outFile = cmsys::SystemTools::Fopen(outFileName, "wb");
- if ((inFile == CM_NULLPTR) || (outFile == CM_NULLPTR)) {
- if (inFile != CM_NULLPTR) {
+ if ((inFile == nullptr) || (outFile == nullptr)) {
+ if (inFile != nullptr) {
fclose(inFile);
}
- if (outFile != CM_NULLPTR) {
+ if (outFile != nullptr) {
fclose(outFile);
}
return false;
@@ -201,7 +200,7 @@ bool cmHexFileConverter::TryConvert(const char* inFileName,
// convert them line by line
bool success = false;
char buf[1024];
- while (fgets(buf, 1024, inFile) != CM_NULLPTR) {
+ while (fgets(buf, 1024, inFile) != nullptr) {
if (type == MotorolaSrec) {
success = ConvertMotorolaSrecLine(buf, outFile);
} else if (type == IntelHex) {