From 95a1400a2ac9de1a29fa305f45b928ce8e3044bd Mon Sep 17 00:00:00 2001 From: lupoDharkael Date: Thu, 2 Apr 2020 01:20:12 +0200 Subject: Replace NULL with nullptr --- core/io/file_access_compressed.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'core/io/file_access_compressed.cpp') diff --git a/core/io/file_access_compressed.cpp b/core/io/file_access_compressed.cpp index 17cc6ce58f..c76142d22d 100644 --- a/core/io/file_access_compressed.cpp +++ b/core/io/file_access_compressed.cpp @@ -64,7 +64,7 @@ Error FileAccessCompressed::open_after_magic(FileAccess *p_base) { cmode = (Compression::Mode)f->get_32(); block_size = f->get_32(); if (block_size == 0) { - f = NULL; // Let the caller to handle the FileAccess object if failed to open as compressed file. + f = nullptr; // Let the caller to handle the FileAccess object if failed to open as compressed file. ERR_FAIL_V_MSG(ERR_FILE_CORRUPT, "Can't open compressed file '" + p_base->get_path() + "' with block size 0, it is corrupted."); } read_total = f->get_32(); @@ -109,7 +109,7 @@ Error FileAccessCompressed::_open(const String &p_path, int p_mode_flags) { if (err != OK) { //not openable - f = NULL; + f = nullptr; return err; } @@ -131,7 +131,7 @@ Error FileAccessCompressed::_open(const String &p_path, int p_mode_flags) { rmagic[4] = 0; if (magic != rmagic || open_after_magic(f) != OK) { memdelete(f); - f = NULL; + f = nullptr; return ERR_FILE_UNRECOGNIZED; } } @@ -187,12 +187,12 @@ void FileAccessCompressed::close() { } memdelete(f); - f = NULL; + f = nullptr; } bool FileAccessCompressed::is_open() const { - return f != NULL; + return f != nullptr; } void FileAccessCompressed::seek(size_t p_position) { @@ -392,20 +392,20 @@ Error FileAccessCompressed::_set_unix_permissions(const String &p_file, uint32_t FileAccessCompressed::FileAccessCompressed() : cmode(Compression::MODE_ZSTD), writing(false), - write_ptr(0), + write_ptr(nullptr), write_buffer_size(0), write_max(0), block_size(0), read_eof(false), at_end(false), - read_ptr(NULL), + read_ptr(nullptr), read_block(0), read_block_count(0), read_block_size(0), read_pos(0), read_total(0), magic("GCMP"), - f(NULL) { + f(nullptr) { } FileAccessCompressed::~FileAccessCompressed() { -- cgit v1.2.3