summaryrefslogtreecommitdiff
path: root/src/fs/virtfileprivate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/virtfileprivate.cpp')
-rw-r--r--src/fs/virtfileprivate.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/fs/virtfileprivate.cpp b/src/fs/virtfileprivate.cpp
index 1dcc6116c..5ebb234cc 100644
--- a/src/fs/virtfileprivate.cpp
+++ b/src/fs/virtfileprivate.cpp
@@ -21,6 +21,7 @@
#include "fs/virtfileprivate.h"
#include <unistd.h>
+#include <zlib.h>
#include "debug.h"
@@ -36,7 +37,7 @@ VirtFilePrivate::VirtFilePrivate(const int fd) :
{
}
-VirtFilePrivate::VirtFilePrivate(PHYSFS_file *const file) :
+VirtFilePrivate::VirtFilePrivate(PHYSFS_file *restrict const file) :
mFile(file),
mFd(-1)
{
@@ -45,10 +46,7 @@ VirtFilePrivate::VirtFilePrivate(PHYSFS_file *const file) :
VirtFilePrivate::~VirtFilePrivate()
{
if (mFile != nullptr)
- {
PHYSFS_close(mFile);
- mFile = nullptr;
- }
if (mFd != -1)
close(mFd);
}