General: Use override where applicable

This commit is contained in:
Lioncash 2019-08-21 18:20:07 -04:00
parent bcfea9a09a
commit 5d157e97b3
4 changed files with 16 additions and 15 deletions

View File

@ -76,7 +76,7 @@ class PyOutStream : public std::ostream {
StreamBuf(PyOutStream& parent, bool deleteOnError) : m_parent(parent), m_deleteOnError(deleteOnError) {}
StreamBuf(const StreamBuf& other) = delete;
StreamBuf(StreamBuf&& other) = default;
int_type overflow(int_type ch);
int_type overflow(int_type ch) override;
} m_sbuf;
PyOutStream(Connection* parent, bool deleteOnError);
@ -85,7 +85,7 @@ public:
PyOutStream(PyOutStream&& other) : std::ostream(&m_sbuf), m_parent(other.m_parent), m_sbuf(std::move(other.m_sbuf)) {
other.m_parent = nullptr;
}
~PyOutStream() { close(); }
~PyOutStream() override { close(); }
void close();
template <typename S, typename... Args, typename Char = fmt::char_t<S>>
void format(const S& format, Args&&... args);

View File

@ -36,7 +36,7 @@ public:
void* m_targetBuf;
size_t m_maxLen;
size_t m_offset;
void run(blender::Token& btok);
void run(blender::Token& btok) override;
BufferTransaction(ClientProcess& parent, const ProjectPath& path, void* target, size_t maxLen, size_t offset)
: Transaction(parent, Type::Buffer), m_path(path), m_targetBuf(target), m_maxLen(maxLen), m_offset(offset) {}
};
@ -46,13 +46,13 @@ public:
bool m_returnResult = false;
bool m_force;
bool m_fast;
void run(blender::Token& btok);
void run(blender::Token& btok) override;
CookTransaction(ClientProcess& parent, const ProjectPath& path, bool force, bool fast, Database::IDataSpec* spec)
: Transaction(parent, Type::Cook), m_path(path), m_dataSpec(spec), m_force(force), m_fast(fast) {}
};
struct LambdaTransaction final : Transaction {
std::function<void(blender::Token&)> m_func;
void run(blender::Token& btok);
void run(blender::Token& btok) override;
LambdaTransaction(ClientProcess& parent, std::function<void(blender::Token&)>&& func)
: Transaction(parent, Type::Lambda), m_func(std::move(func)) {}
};

View File

@ -26,13 +26,14 @@ class Console {
Console* m_con;
LogVisorAdapter(Console* con) : m_con(con) {}
~LogVisorAdapter() = default;
void report(const char* modName, logvisor::Level severity, fmt::string_view format, fmt::format_args args);
void report(const char* modName, logvisor::Level severity, fmt::wstring_view format, fmt::wformat_args args);
~LogVisorAdapter() override = default;
void report(const char* modName, logvisor::Level severity, fmt::string_view format, fmt::format_args args) override;
void report(const char* modName, logvisor::Level severity, fmt::wstring_view format,
fmt::wformat_args args) override;
void reportSource(const char* modName, logvisor::Level severity, const char* file, unsigned linenum,
fmt::string_view format, fmt::format_args args);
fmt::string_view format, fmt::format_args args) override;
void reportSource(const char* modName, logvisor::Level severity, const char* file, unsigned linenum,
fmt::wstring_view format, fmt::wformat_args args);
fmt::wstring_view format, fmt::wformat_args args) override;
};
public:

View File

@ -24,9 +24,9 @@ public:
m_zstrm.avail_in = 0;
inflateInit(&m_zstrm);
}
~ShaderCacheZipStream() { inflateEnd(&m_zstrm); }
~ShaderCacheZipStream() override { inflateEnd(&m_zstrm); }
operator bool() const { return m_compBuf.operator bool(); }
atUint64 readUBytesToBuf(void* buf, atUint64 len) {
atUint64 readUBytesToBuf(void* buf, atUint64 len) override {
m_zstrm.next_out = (Bytef*)buf;
m_zstrm.avail_out = len;
m_zstrm.total_out = 0;
@ -42,9 +42,9 @@ public:
}
return m_zstrm.total_out;
}
void seek(atInt64, athena::SeekOrigin) {}
atUint64 position() const { return 0; }
atUint64 length() const { return 0; }
void seek(atInt64, athena::SeekOrigin) override {}
atUint64 position() const override { return 0; }
atUint64 length() const override { return 0; }
};
template <typename P, typename S>