summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/GZipFile.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-10-23 14:59:42 +0200
committerHowaner <franzi.moos@googlemail.com>2014-10-23 14:59:42 +0200
commit72bb299a4a4f74840c3b368c6669ddc3d32006ee (patch)
tree748fee756010b1f36aa95162f762e21ee0d19c0a /src/OSSupport/GZipFile.cpp
parentMerge branch 'master' into ChunkLoader (diff)
parentFixed a crash in redstone simulator. (diff)
downloadcuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar
cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.gz
cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.bz2
cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.lz
cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.xz
cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.tar.zst
cuberite-72bb299a4a4f74840c3b368c6669ddc3d32006ee.zip
Diffstat (limited to 'src/OSSupport/GZipFile.cpp')
-rw-r--r--src/OSSupport/GZipFile.cpp14
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;