diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-26 16:07:54 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-26 16:07:54 +0100 |
commit | 5afe88df2538274859a162ffd63ed52118e80c19 (patch) | |
tree | b610dfd58dc748fd63f49565b2a43eea2316714f /src/utils/zlib.cpp | |
parent | 73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff) | |
download | mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.gz mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.bz2 mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.xz mana-5afe88df2538274859a162ffd63ed52118e80c19.zip |
Apply C++11 fixits
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
Diffstat (limited to 'src/utils/zlib.cpp')
-rw-r--r-- | src/utils/zlib.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/utils/zlib.cpp b/src/utils/zlib.cpp index 7a5421fd..8234766e 100644 --- a/src/utils/zlib.cpp +++ b/src/utils/zlib.cpp @@ -57,7 +57,7 @@ int inflateMemory(unsigned char *in, unsigned int inLength, do { - if (strm.next_out == NULL) + if (strm.next_out == nullptr) { inflateEnd(&strm); return Z_MEM_ERROR; @@ -80,7 +80,7 @@ int inflateMemory(unsigned char *in, unsigned int inLength, { out = (unsigned char*) realloc(out, bufferSize * 2); - if (out == NULL) + if (out == nullptr) { inflateEnd(&strm); return Z_MEM_ERROR; @@ -105,7 +105,7 @@ int inflateMemory(unsigned char *in, unsigned int inLength, unsigned int outLength = 0; int ret = inflateMemory(in, inLength, out, outLength); - if (ret != Z_OK || out == NULL) + if (ret != Z_OK || out == nullptr) { if (ret == Z_MEM_ERROR) { @@ -125,7 +125,7 @@ int inflateMemory(unsigned char *in, unsigned int inLength, } free(out); - out = NULL; + out = nullptr; outLength = 0; } @@ -163,7 +163,7 @@ void *loadCompressedFile(const std::string &filename, int &filesize) { logger->log("Could not decompress file: %s", filename.c_str()); - return NULL; + return nullptr; } filesize = inflatedSize; @@ -179,5 +179,5 @@ void *loadCompressedFile(const std::string &filename, int &filesize) logger->log("Error loading file from drive: %s", filename.c_str()); } - return NULL; + return nullptr; } |