Skip to content

Commit 8577323

Browse files
committed
use nullptr
1 parent b91bcca commit 8577323

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

code/ktxutils/ktxutils.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ int ktx1_read_header(const char* filename, CFILE* img_cfp, int* w, int* h, int*
9191
{
9292
CFILE* cf;
9393
char real_name[MAX_FILENAME_LEN];
94-
if (img_cfp == NULL) {
94+
if (img_cfp == nullptr) {
9595
// this better not happen.. ever
96-
Assert(filename != NULL);
96+
Assert(filename != nullptr);
9797

9898
// make sure there is an extension
9999
strcpy_s(real_name, filename);
@@ -107,7 +107,7 @@ int ktx1_read_header(const char* filename, CFILE* img_cfp, int* w, int* h, int*
107107
cf = cfopen(real_name, "rb");
108108

109109
// file not found
110-
if (cf == NULL)
110+
if (cf == nullptr)
111111
return KTX1_ERROR_INVALID_FILENAME;
112112
} else {
113113
cf = img_cfp;
@@ -218,7 +218,7 @@ int ktx1_read_bitmap(const char* filename, ubyte* dst, ubyte* out_bpp)
218218
CFILE* cf;
219219
char real_name[MAX_FILENAME_LEN];
220220
// this better not happen.. ever
221-
Assert(filename != NULL);
221+
Assert(filename != nullptr);
222222

223223
// make sure there is an extension
224224
strcpy_s(real_name, filename);
@@ -232,7 +232,7 @@ int ktx1_read_bitmap(const char* filename, ubyte* dst, ubyte* out_bpp)
232232
cf = cfopen(real_name, "rb");
233233

234234
// file not found
235-
if (cf == NULL)
235+
if (cf == nullptr)
236236
return KTX1_ERROR_INVALID_FILENAME;
237237

238238
KTX1_Header hdr{};

0 commit comments

Comments
 (0)