summaryrefslogtreecommitdiffstats
path: root/Source/cmHexFileConverter.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2017-08-22 21:42:36 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2017-08-24 21:39:47 (GMT)
commit5962db438939ef2754509b8578af1f845ec07dc8 (patch)
treef6b0c0db2acc8dc889d2d5d46fdf75659daa17e7 /Source/cmHexFileConverter.cxx
parentfe19fda2aa2595622c463fccaa8b36a91e4521c4 (diff)
downloadCMake-5962db438939ef2754509b8578af1f845ec07dc8.zip
CMake-5962db438939ef2754509b8578af1f845ec07dc8.tar.gz
CMake-5962db438939ef2754509b8578af1f845ec07dc8.tar.bz2
Use C++11 nullptr
Diffstat (limited to 'Source/cmHexFileConverter.cxx')
-rw-r--r--Source/cmHexFileConverter.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmHexFileConverter.cxx b/Source/cmHexFileConverter.cxx
index 78dceb7..057a7bb 100644
--- a/Source/cmHexFileConverter.cxx
+++ b/Source/cmHexFileConverter.cxx
@@ -22,7 +22,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 +139,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 +188,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 +201,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) {