aboutsummaryrefslogtreecommitdiff
path: root/common/file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/file.cpp')
-rw-r--r--common/file.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/common/file.cpp b/common/file.cpp
index 9797bcaa69..5fc4f9012b 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -31,7 +31,7 @@
namespace Common {
File::File()
- : _handle(0) {
+ : _handle(nullptr) {
}
File::~File() {
@@ -46,7 +46,7 @@ bool File::open(const String &filename, Archive &archive) {
assert(!filename.empty());
assert(!_handle);
- SeekableReadStream *stream = 0;
+ SeekableReadStream *stream = nullptr;
if ((stream = archive.createReadStreamForMember(filename))) {
debug(8, "Opening hashed: %s", filename.c_str());
@@ -83,7 +83,7 @@ bool File::open(SeekableReadStream *stream, const String &name) {
} else {
debug(2, "File::open: opening '%s' failed", name.c_str());
}
- return _handle != NULL;
+ return _handle != nullptr;
}
@@ -101,11 +101,11 @@ bool File::exists(const String &filename) {
void File::close() {
delete _handle;
- _handle = NULL;
+ _handle = nullptr;
}
bool File::isOpen() const {
- return _handle != NULL;
+ return _handle != nullptr;
}
bool File::err() const {
@@ -144,7 +144,7 @@ uint32 File::read(void *ptr, uint32 len) {
}
-DumpFile::DumpFile() : _handle(0) {
+DumpFile::DumpFile() : _handle(nullptr) {
}
DumpFile::~DumpFile() {
@@ -182,19 +182,19 @@ bool DumpFile::open(const FSNode &node) {
_handle = node.createWriteStream();
- if (_handle == NULL)
+ if (_handle == nullptr)
debug(2, "File %s not found", node.getName().c_str());
- return _handle != NULL;
+ return _handle != nullptr;
}
void DumpFile::close() {
delete _handle;
- _handle = NULL;
+ _handle = nullptr;
}
bool DumpFile::isOpen() const {
- return _handle != NULL;
+ return _handle != nullptr;
}
bool DumpFile::err() const {