summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/GZipFile.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-20 22:55:07 +0200
committerarchshift <admin@archshift.com>2014-10-23 05:12:49 +0200
commita26541a7c3ced0569098edd0aae61c097c2912f4 (patch)
tree4b7bea204c0ddd18bb4f95357f9eb77590bc2e8d /src/OSSupport/GZipFile.cpp
parentComposableGenerator: Removed nullptr initializers. (diff)
downloadcuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.gz
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.bz2
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.lz
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.xz
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.tar.zst
cuberite-a26541a7c3ced0569098edd0aae61c097c2912f4.zip
Diffstat (limited to '')
-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;