diff --git a/include/LZ77/LZType10.hpp b/include/LZ77/LZType10.hpp
index c613625..a3517bc 100644
--- a/include/LZ77/LZType10.hpp
+++ b/include/LZ77/LZType10.hpp
@@ -6,6 +6,6 @@ class LZType10 : public LZBase {
public:
explicit LZType10(atInt32 minimumOffset = 1, atInt32 SlidingWindow = 4096, atInt32 MinimumMatch = 3,
atInt32 BlockSize = 8);
- atUint32 compress(const atUint8* src, atUint8** dstBuf, atUint32 srcLength);
- atUint32 decompress(const atUint8* src, atUint8** dst, atUint32 srcLen);
+ atUint32 compress(const atUint8* src, atUint8** dstBuf, atUint32 srcLength) override;
+ atUint32 decompress(const atUint8* src, atUint8** dst, atUint32 srcLen) override;
};
diff --git a/include/LZ77/LZType11.hpp b/include/LZ77/LZType11.hpp
index e5e1c99..7402319 100644
--- a/include/LZ77/LZType11.hpp
+++ b/include/LZ77/LZType11.hpp
@@ -6,6 +6,6 @@ class LZType11 : public LZBase {
public:
explicit LZType11(atInt32 MinimumOffset = 1, atInt32 SlidingWindow = 4096, atInt32 MinimumMatch = 3,
atInt32 BlockSize = 8);
- atUint32 compress(const atUint8* src, atUint8** dst, atUint32 srcLength);
- atUint32 decompress(const atUint8* src, atUint8** dst, atUint32 srcLength);
+ atUint32 compress(const atUint8* src, atUint8** dst, atUint32 srcLength) override;
+ atUint32 decompress(const atUint8* src, atUint8** dst, atUint32 srcLength) override;
};
diff --git a/include/athena/FileReader.hpp b/include/athena/FileReader.hpp
index a11e410..123b3ab 100644
--- a/include/athena/FileReader.hpp
+++ b/include/athena/FileReader.hpp
@@ -18,7 +18,7 @@ class FileReader : public IStreamReader {
public:
FileReader(std::string_view filename, atInt32 cacheSize = (32 * 1024), bool globalErr = true);
FileReader(std::wstring_view filename, atInt32 cacheSize = (32 * 1024), bool globalErr = true);
- virtual ~FileReader();
+ ~FileReader() override;
std::string filename() const {
#if _WIN32
@@ -40,10 +40,10 @@ public:
void close();
bool isOpen() const { return m_fileHandle != 0; }
bool save();
- void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current);
- atUint64 position() const;
- atUint64 length() const;
- atUint64 readUBytesToBuf(void* buf, atUint64 len);
+ void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current) override;
+ atUint64 position() const override;
+ atUint64 length() const override;
+ atUint64 readUBytesToBuf(void* buf, atUint64 len) override;
void setCacheSize(const atInt32 blockSize);
diff --git a/include/athena/FileWriter.hpp b/include/athena/FileWriter.hpp
index e104e7f..a095d9b 100644
--- a/include/athena/FileWriter.hpp
+++ b/include/athena/FileWriter.hpp
@@ -15,7 +15,7 @@ class FileWriter : public IStreamWriter {
public:
FileWriter(std::string_view filename, bool overwrite = true, bool globalErr = true);
FileWriter(std::wstring_view filename, bool overwrite = true, bool globalErr = true);
- virtual ~FileWriter();
+ ~FileWriter() override;
std::string filename() const {
#if _WIN32
@@ -35,10 +35,10 @@ public:
void open(bool overwrite = true);
void close();
bool isOpen() const { return m_fileHandle != 0; }
- void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current);
- atUint64 position() const;
- atUint64 length() const;
- void writeUBytes(const atUint8* data, atUint64 len);
+ void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current) override;
+ atUint64 position() const override;
+ atUint64 length() const override;
+ void writeUBytes(const atUint8* data, atUint64 len) override;
#if _WIN32
using HandleType = HANDLE;
@@ -99,12 +99,12 @@ public:
m_position = 0;
}
- atUint64 position() const { return m_position; }
- atUint64 length() const { return m_deferredBuffer.size(); }
- void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current);
- void writeUBytes(const atUint8* data, atUint64 len);
+ atUint64 position() const override { return m_position; }
+ atUint64 length() const override { return m_deferredBuffer.size(); }
+ void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current) override;
+ void writeUBytes(const atUint8* data, atUint64 len) override;
- ~TransactionalFileWriter() { flush(); }
+ ~TransactionalFileWriter() override { flush(); }
};
} // namespace athena::io
diff --git a/include/athena/IStreamReader.hpp b/include/athena/IStreamReader.hpp
index 9468695..2826255 100644
--- a/include/athena/IStreamReader.hpp
+++ b/include/athena/IStreamReader.hpp
@@ -15,14 +15,14 @@ namespace athena::io {
*/
class IStreamReader : public IStream {
public:
- virtual ~IStreamReader() = default;
+ ~IStreamReader() override = default;
/** @brief Sets the buffers position relative to the specified position.
* It seeks relative to the current position by default.
* @param position where in the buffer to seek
* @param origin The Origin to seek relative to
*/
- virtual void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current) = 0;
+ void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current) override = 0;
/** @brief Sets the buffer's position relative to the next 64-byte aligned position.
*/
@@ -44,19 +44,19 @@ public:
*
* @return True if at end; False otherwise.
*/
- bool atEnd() const { return position() >= length(); }
+ bool atEnd() const override { return position() >= length(); }
/** @brief Returns the current position in the stream.
*
* @return The current position in the stream.
*/
- virtual atUint64 position() const = 0;
+ atUint64 position() const override = 0;
/** @brief Returns the length of the file.
*
* @return True length of the file.
*/
- virtual atUint64 length() const = 0;
+ atUint64 length() const override = 0;
/** @brief Reads a byte at the current position and advances the current position
*
diff --git a/include/athena/IStreamWriter.hpp b/include/athena/IStreamWriter.hpp
index 8dfa166..f0ea434 100644
--- a/include/athena/IStreamWriter.hpp
+++ b/include/athena/IStreamWriter.hpp
@@ -9,14 +9,14 @@
namespace athena::io {
class IStreamWriter : public IStream {
public:
- virtual ~IStreamWriter() = default;
+ ~IStreamWriter() override = default;
/** @brief Sets the buffers position relative to the specified position.
* It seeks relative to the current position by default.
* @param position where in the buffer to seek
* @param origin The location to seek relative to
*/
- virtual void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current) = 0;
+ void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current) override = 0;
/** @brief Sets the buffers position relative to the next 32-byte aligned position.
*/
@@ -36,19 +36,19 @@ public:
*
* @return True if at end; False otherwise.
*/
- bool atEnd() const { return position() >= length(); }
+ bool atEnd() const override { return position() >= length(); }
/** @brief Returns the current position in the stream.
*
* @return The current position in the stream.
*/
- virtual atUint64 position() const = 0;
+ atUint64 position() const override = 0;
/** @brief Returns whether or not the stream is at the end.
*
* @return True if at end; False otherwise.
*/
- virtual atUint64 length() const = 0;
+ atUint64 length() const override = 0;
/** @brief Writes a byte at the current position and advances the position by one byte.
* @param val The value to write
diff --git a/include/athena/MemoryReader.hpp b/include/athena/MemoryReader.hpp
index 821dba2..6d7064a 100644
--- a/include/athena/MemoryReader.hpp
+++ b/include/athena/MemoryReader.hpp
@@ -19,7 +19,7 @@ protected:
MemoryReader() = default;
public:
- virtual ~MemoryReader();
+ ~MemoryReader() override;
/*! \brief This constructor references an existing buffer to read from.
*
@@ -34,19 +34,19 @@ public:
* \param position where in the buffer to seek
* \param origin The Origin to seek \sa SeekOrigin
*/
- void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current);
+ void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current) override;
/*! \brief Returns the current position in the stream.
*
* \return Int64 The current position in the stream.
*/
- atUint64 position() const { return m_position; }
+ atUint64 position() const override { return m_position; }
/*! \brief Returns whether or not the stream is at the end.
*
* \return bool True if at end; False otherwise.
*/
- atUint64 length() const { return m_length; }
+ atUint64 length() const override { return m_length; }
/*! \brief Sets the buffer to the given one, deleting the current one.
* BEWARE: As this deletes the current buffer it WILL cause a loss of data
@@ -74,7 +74,7 @@ public:
* \param len Length to read
* \return Number of bytes read
*/
- atUint64 readUBytesToBuf(void* buf, atUint64 len);
+ atUint64 readUBytesToBuf(void* buf, atUint64 len) override;
protected:
const void* m_data = nullptr;
diff --git a/include/athena/MemoryWriter.hpp b/include/athena/MemoryWriter.hpp
index 01f484f..b18a9bc 100644
--- a/include/athena/MemoryWriter.hpp
+++ b/include/athena/MemoryWriter.hpp
@@ -17,7 +17,7 @@ namespace athena::io {
*/
class MemoryWriter : public IStreamWriter {
public:
- virtual ~MemoryWriter();
+ ~MemoryWriter() override;
/*! @brief This constructor references an existing buffer to write to in-place.
*
@@ -31,19 +31,19 @@ public:
* @param position where in the buffer to seek
* @param origin The Origin to seek @sa SeekOrigin
*/
- void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current);
+ void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current) override;
/*! @brief Returns the current position in the stream.
*
* @return Int64 The current position in the stream.
*/
- atUint64 position() const { return m_position; }
+ atUint64 position() const override { return m_position; }
/*! @brief Returns the length of the stream.
*
* @return Int64 The length of the stream.
*/
- atUint64 length() const { return m_length; }
+ atUint64 length() const override { return m_length; }
bool isOpen() const { return true; }
@@ -85,7 +85,7 @@ public:
* @param data The buffer to write
* @param length The amount to write
*/
- void writeUBytes(const atUint8* data, atUint64 len);
+ void writeUBytes(const atUint8* data, atUint64 len) override;
protected:
MemoryWriter() {}
@@ -116,7 +116,7 @@ public:
* @param position where in the buffer to seek
* @param origin The Origin to seek @sa SeekOrigin
*/
- void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current);
+ void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current) override;
/*! @brief Sets the buffer to the given one, deleting the current one.
* BEWARE: As this deletes the current buffer it WILL cause a loss of data
@@ -135,7 +135,7 @@ public:
* @param data The buffer to write
* @param length The amount to write
*/
- void writeUBytes(const atUint8* data, atUint64 len);
+ void writeUBytes(const atUint8* data, atUint64 len) override;
protected:
std::unique_ptr m_dataCopy;
diff --git a/include/athena/VectorWriter.hpp b/include/athena/VectorWriter.hpp
index 13c45d2..7257812 100644
--- a/include/athena/VectorWriter.hpp
+++ b/include/athena/VectorWriter.hpp
@@ -22,19 +22,19 @@ public:
* @param position where in the buffer to seek
* @param origin The Origin to seek @sa SeekOrigin
*/
- void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current);
+ void seek(atInt64 pos, SeekOrigin origin = SeekOrigin::Current) override;
/*! @brief Returns the current position in the stream.
*
* @return Int64 The current position in the stream.
*/
- atUint64 position() const { return m_position; }
+ atUint64 position() const override { return m_position; }
/*! @brief Returns the length of the stream.
*
* @return Int64 The length of the stream.
*/
- atUint64 length() const { return m_data.size(); }
+ atUint64 length() const override { return m_data.size(); }
bool isOpen() const { return true; }
@@ -48,7 +48,7 @@ public:
* @param data The buffer to write
* @param length The amount to write
*/
- void writeUBytes(const atUint8* data, atUint64 len);
+ void writeUBytes(const atUint8* data, atUint64 len) override;
protected:
std::vector m_data;