mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-08-12 12:19:05 +00:00
Merge pull request #13 from lioncash/override
General: Use override where applicable
This commit is contained in:
commit
3177d356ec
@ -76,7 +76,7 @@ class PyOutStream : public std::ostream {
|
|||||||
StreamBuf(PyOutStream& parent, bool deleteOnError) : m_parent(parent), m_deleteOnError(deleteOnError) {}
|
StreamBuf(PyOutStream& parent, bool deleteOnError) : m_parent(parent), m_deleteOnError(deleteOnError) {}
|
||||||
StreamBuf(const StreamBuf& other) = delete;
|
StreamBuf(const StreamBuf& other) = delete;
|
||||||
StreamBuf(StreamBuf&& other) = default;
|
StreamBuf(StreamBuf&& other) = default;
|
||||||
int_type overflow(int_type ch);
|
int_type overflow(int_type ch) override;
|
||||||
} m_sbuf;
|
} m_sbuf;
|
||||||
PyOutStream(Connection* parent, bool deleteOnError);
|
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)) {
|
PyOutStream(PyOutStream&& other) : std::ostream(&m_sbuf), m_parent(other.m_parent), m_sbuf(std::move(other.m_sbuf)) {
|
||||||
other.m_parent = nullptr;
|
other.m_parent = nullptr;
|
||||||
}
|
}
|
||||||
~PyOutStream() { close(); }
|
~PyOutStream() override { close(); }
|
||||||
void close();
|
void close();
|
||||||
template <typename S, typename... Args, typename Char = fmt::char_t<S>>
|
template <typename S, typename... Args, typename Char = fmt::char_t<S>>
|
||||||
void format(const S& format, Args&&... args);
|
void format(const S& format, Args&&... args);
|
||||||
|
@ -36,7 +36,7 @@ public:
|
|||||||
void* m_targetBuf;
|
void* m_targetBuf;
|
||||||
size_t m_maxLen;
|
size_t m_maxLen;
|
||||||
size_t m_offset;
|
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)
|
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) {}
|
: 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_returnResult = false;
|
||||||
bool m_force;
|
bool m_force;
|
||||||
bool m_fast;
|
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)
|
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) {}
|
: Transaction(parent, Type::Cook), m_path(path), m_dataSpec(spec), m_force(force), m_fast(fast) {}
|
||||||
};
|
};
|
||||||
struct LambdaTransaction final : Transaction {
|
struct LambdaTransaction final : Transaction {
|
||||||
std::function<void(blender::Token&)> m_func;
|
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)
|
LambdaTransaction(ClientProcess& parent, std::function<void(blender::Token&)>&& func)
|
||||||
: Transaction(parent, Type::Lambda), m_func(std::move(func)) {}
|
: Transaction(parent, Type::Lambda), m_func(std::move(func)) {}
|
||||||
};
|
};
|
||||||
|
@ -26,13 +26,14 @@ class Console {
|
|||||||
Console* m_con;
|
Console* m_con;
|
||||||
LogVisorAdapter(Console* con) : m_con(con) {}
|
LogVisorAdapter(Console* con) : m_con(con) {}
|
||||||
|
|
||||||
~LogVisorAdapter() = default;
|
~LogVisorAdapter() override = 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::string_view format, fmt::format_args args) override;
|
||||||
void report(const char* modName, logvisor::Level severity, fmt::wstring_view format, fmt::wformat_args args);
|
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,
|
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,
|
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:
|
public:
|
||||||
|
@ -24,9 +24,9 @@ public:
|
|||||||
m_zstrm.avail_in = 0;
|
m_zstrm.avail_in = 0;
|
||||||
inflateInit(&m_zstrm);
|
inflateInit(&m_zstrm);
|
||||||
}
|
}
|
||||||
~ShaderCacheZipStream() { inflateEnd(&m_zstrm); }
|
~ShaderCacheZipStream() override { inflateEnd(&m_zstrm); }
|
||||||
operator bool() const { return m_compBuf.operator bool(); }
|
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.next_out = (Bytef*)buf;
|
||||||
m_zstrm.avail_out = len;
|
m_zstrm.avail_out = len;
|
||||||
m_zstrm.total_out = 0;
|
m_zstrm.total_out = 0;
|
||||||
@ -42,9 +42,9 @@ public:
|
|||||||
}
|
}
|
||||||
return m_zstrm.total_out;
|
return m_zstrm.total_out;
|
||||||
}
|
}
|
||||||
void seek(atInt64, athena::SeekOrigin) {}
|
void seek(atInt64, athena::SeekOrigin) override {}
|
||||||
atUint64 position() const { return 0; }
|
atUint64 position() const override { return 0; }
|
||||||
atUint64 length() const { return 0; }
|
atUint64 length() const override { return 0; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename P, typename S>
|
template <typename P, typename S>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user