summaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/virtfs/fsdir.cpp8
-rw-r--r--src/fs/virtfs/fszip.cpp3
2 files changed, 4 insertions, 7 deletions
diff --git a/src/fs/virtfs/fsdir.cpp b/src/fs/virtfs/fsdir.cpp
index be980ae65..f32cbba4b 100644
--- a/src/fs/virtfs/fsdir.cpp
+++ b/src/fs/virtfs/fsdir.cpp
@@ -76,8 +76,7 @@ namespace FsDir
filename.c_str());
return nullptr;
}
- File *restrict const file = new File(&funcs, fd);
- return file;
+ return new File(&funcs, fd);
}
File *openRead(FsEntry *restrict const entry,
@@ -409,11 +408,10 @@ namespace FsDir
return 0;
}
#ifdef USE_FILE_FOPEN
- const int64_t pos = ftell(fd);
+ return ftell(fd);
#else // USE_FILE_FOPEN
- const int64_t pos = lseek(fd, 0, SEEK_CUR);
+ return lseek(fd, 0, SEEK_CUR);
#endif // USE_FILE_FOPEN
- return pos;
}
int seek(File *restrict const file,
diff --git a/src/fs/virtfs/fszip.cpp b/src/fs/virtfs/fszip.cpp
index 148df66fc..fcb726173 100644
--- a/src/fs/virtfs/fszip.cpp
+++ b/src/fs/virtfs/fszip.cpp
@@ -557,10 +557,9 @@ namespace FsZip
ZipReader::readFile(header);
if (buf == nullptr)
return nullptr;
- File *restrict const file = new File(&funcs,
+ return new File(&funcs,
buf,
header->uncompressSize);
- return file;
}
}
return nullptr;