diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-10-20 22:55:07 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-10-20 22:55:07 +0200 |
commit | 987f79afdd8945966d0dfa2d52539e005f771590 (patch) | |
tree | fa55849604121317e0a565465212032ebe4b79cb /src/OSSupport/GZipFile.cpp | |
parent | Use std::recusive_mutex (diff) | |
download | cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.gz cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.bz2 cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.lz cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.xz cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.zst cuberite-987f79afdd8945966d0dfa2d52539e005f771590.zip |
Diffstat (limited to 'src/OSSupport/GZipFile.cpp')
-rw-r--r-- | src/OSSupport/GZipFile.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/OSSupport/GZipFile.cpp b/src/OSSupport/GZipFile.cpp index 22d887783..32d84a0d5 100644 --- a/src/OSSupport/GZipFile.cpp +++ b/src/OSSupport/GZipFile.cpp @@ -11,7 +11,7 @@ cGZipFile::cGZipFile(void) : - m_File(NULL), m_Mode(fmRead) + m_File(nullptr), m_Mode(fmRead) { } @@ -30,14 +30,14 @@ cGZipFile::~cGZipFile() bool cGZipFile::Open(const AString & a_FileName, eMode a_Mode) { - if (m_File != NULL) + if (m_File != nullptr) { ASSERT(!"A file is already open in this object"); return false; } m_File = gzopen(a_FileName.c_str(), (a_Mode == fmRead) ? "r" : "w"); m_Mode = a_Mode; - return (m_File != NULL); + return (m_File != nullptr); } @@ -46,10 +46,10 @@ bool cGZipFile::Open(const AString & a_FileName, eMode a_Mode) void cGZipFile::Close(void) { - if (m_File != NULL) + if (m_File != nullptr) { gzclose(m_File); - m_File = NULL; + m_File = nullptr; } } @@ -59,7 +59,7 @@ void cGZipFile::Close(void) int cGZipFile::ReadRestOfFile(AString & a_Contents) { - if (m_File == NULL) + if (m_File == nullptr) { ASSERT(!"No file has been opened"); return -1; @@ -90,7 +90,7 @@ int cGZipFile::ReadRestOfFile(AString & a_Contents) bool cGZipFile::Write(const char * a_Contents, int a_Size) { - if (m_File == NULL) + if (m_File == nullptr) { ASSERT(!"No file has been opened"); return false; |