summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/saveload.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index cd30ed859..f066d014d 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -1844,7 +1844,7 @@ struct FileReader : LoadFilter {
_sl.sf = NULL;
}
- /* virtual */ size_t Read(byte *buf, size_t size)
+ size_t Read(byte *buf, size_t size) override
{
/* We're in the process of shutting down, i.e. in "failure" mode. */
if (this->file == NULL) return 0;
@@ -1852,7 +1852,7 @@ struct FileReader : LoadFilter {
return fread(buf, 1, size, this->file);
}
- /* virtual */ void Reset()
+ void Reset() override
{
clearerr(this->file);
if (fseek(this->file, this->begin, SEEK_SET)) {
@@ -1882,7 +1882,7 @@ struct FileWriter : SaveFilter {
_sl.sf = NULL;
}
- /* virtual */ void Write(byte *buf, size_t size)
+ void Write(byte *buf, size_t size) override
{
/* We're in the process of shutting down, i.e. in "failure" mode. */
if (this->file == NULL) return;
@@ -1890,7 +1890,7 @@ struct FileWriter : SaveFilter {
if (fwrite(buf, 1, size, this->file) != size) SlError(STR_GAME_SAVELOAD_ERROR_FILE_NOT_WRITEABLE);
}
- /* virtual */ void Finish()
+ void Finish() override
{
if (this->file != NULL) fclose(this->file);
this->file = NULL;
@@ -1918,7 +1918,7 @@ struct LZOLoadFilter : LoadFilter {
if (lzo_init() != LZO_E_OK) SlError(STR_GAME_SAVELOAD_ERROR_BROKEN_INTERNAL_ERROR, "cannot initialize decompressor");
}
- /* virtual */ size_t Read(byte *buf, size_t ssize)
+ size_t Read(byte *buf, size_t ssize) override
{
assert(ssize >= LZO_BUFFER_SIZE);
@@ -1966,7 +1966,7 @@ struct LZOSaveFilter : SaveFilter {
if (lzo_init() != LZO_E_OK) SlError(STR_GAME_SAVELOAD_ERROR_BROKEN_INTERNAL_ERROR, "cannot initialize compressor");
}
- /* virtual */ void Write(byte *buf, size_t size)
+ void Write(byte *buf, size_t size) override
{
const lzo_bytep in = buf;
/* Buffer size is from the LZO docs plus the chunk header size. */
@@ -2005,7 +2005,7 @@ struct NoCompLoadFilter : LoadFilter {
{
}
- /* virtual */ size_t Read(byte *buf, size_t size)
+ size_t Read(byte *buf, size_t size) override
{
return this->chain->Read(buf, size);
}
@@ -2022,7 +2022,7 @@ struct NoCompSaveFilter : SaveFilter {
{
}
- /* virtual */ void Write(byte *buf, size_t size)
+ void Write(byte *buf, size_t size) override
{
this->chain->Write(buf, size);
}
@@ -2056,7 +2056,7 @@ struct ZlibLoadFilter : LoadFilter {
inflateEnd(&this->z);
}
- /* virtual */ size_t Read(byte *buf, size_t size)
+ size_t Read(byte *buf, size_t size) override
{
this->z.next_out = buf;
this->z.avail_out = (uint)size;
@@ -2135,12 +2135,12 @@ struct ZlibSaveFilter : SaveFilter {
} while (this->z.avail_in || !this->z.avail_out);
}
- /* virtual */ void Write(byte *buf, size_t size)
+ void Write(byte *buf, size_t size) override
{
this->WriteLoop(buf, size, 0);
}
- /* virtual */ void Finish()
+ void Finish() override
{
this->WriteLoop(NULL, 0, Z_FINISH);
this->chain->Finish();
@@ -2185,7 +2185,7 @@ struct LZMALoadFilter : LoadFilter {
lzma_end(&this->lzma);
}
- /* virtual */ size_t Read(byte *buf, size_t size)
+ size_t Read(byte *buf, size_t size) override
{
this->lzma.next_out = buf;
this->lzma.avail_out = size;
@@ -2254,12 +2254,12 @@ struct LZMASaveFilter : SaveFilter {
} while (this->lzma.avail_in || !this->lzma.avail_out);
}
- /* virtual */ void Write(byte *buf, size_t size)
+ void Write(byte *buf, size_t size) override
{
this->WriteLoop(buf, size, LZMA_RUN);
}
- /* virtual */ void Finish()
+ void Finish() override
{
this->WriteLoop(NULL, 0, LZMA_FINISH);
this->chain->Finish();