2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:07:42 +00:00

RuntimeCommonB: Use the override specifier where applicable

Applies the override keyword where applicable to indicate visually where
member function overriding is occurring. This only targets
the RuntimeCommonB target as a starting point, which resolves around
900+ cases where the keyword could be used.
This commit is contained in:
Lioncash
2019-08-09 08:45:18 -04:00
parent 5acf9ecbcf
commit 2059535b55
144 changed files with 1011 additions and 999 deletions

View File

@@ -18,20 +18,20 @@ class CFileDvdRequest : public IDvdRequest {
std::function<void(u32)> m_callback;
public:
~CFileDvdRequest() { PostCancelRequest(); }
~CFileDvdRequest() override { PostCancelRequest(); }
void WaitUntilComplete() {
void WaitUntilComplete() override {
while (!m_complete.load() && !m_cancel.load()) {
std::unique_lock<std::mutex> lk(CDvdFile::m_WaitMutex);
}
}
bool IsComplete() { return m_complete.load(); }
void PostCancelRequest() {
bool IsComplete() override { return m_complete.load(); }
void PostCancelRequest() override {
std::unique_lock<std::mutex> waitlk(CDvdFile::m_WaitMutex);
m_cancel.store(true);
}
EMediaType GetMediaType() const { return EMediaType::File; }
EMediaType GetMediaType() const override { return EMediaType::File; }
CFileDvdRequest(CDvdFile& file, void* buf, u32 len, ESeekOrigin whence, int off, std::function<void(u32)>&& cb)
: m_reader(file.m_reader), m_buf(buf), m_len(len), m_whence(whence), m_offset(off), m_callback(std::move(cb)) {}