2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 01:07:43 +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

@@ -45,58 +45,64 @@ private:
public:
CResLoader& GetLoader() { return x4_loader; }
std::unique_ptr<IObj> Build(const SObjectTag&, const CVParamTransfer&, CObjectReference* selfRef);
void BuildAsync(const SObjectTag&, const CVParamTransfer&, std::unique_ptr<IObj>*, CObjectReference* selfRef);
void AsyncIdle();
void CancelBuild(const SObjectTag&);
std::unique_ptr<IObj> Build(const SObjectTag&, const CVParamTransfer&, CObjectReference* selfRef) override;
void BuildAsync(const SObjectTag&, const CVParamTransfer&, std::unique_ptr<IObj>*,
CObjectReference* selfRef) override;
void AsyncIdle() override;
void CancelBuild(const SObjectTag&) override;
bool CanBuild(const SObjectTag& tag) { return x4_loader.ResourceExists(tag); }
bool CanBuild(const SObjectTag& tag) override { return x4_loader.ResourceExists(tag); }
u32 ResourceSize(const urde::SObjectTag& tag) { return x4_loader.ResourceSize(tag); }
u32 ResourceSize(const urde::SObjectTag& tag) override { return x4_loader.ResourceSize(tag); }
std::unique_ptr<u8[]> LoadResourceSync(const urde::SObjectTag& tag) { return x4_loader.LoadResourceSync(tag); }
std::unique_ptr<u8[]> LoadResourceSync(const urde::SObjectTag& tag) override {
return x4_loader.LoadResourceSync(tag);
}
std::unique_ptr<u8[]> LoadNewResourcePartSync(const urde::SObjectTag& tag, u32 off, u32 size) {
std::unique_ptr<u8[]> LoadNewResourcePartSync(const urde::SObjectTag& tag, u32 off, u32 size) override {
return x4_loader.LoadNewResourcePartSync(tag, off, size);
}
void GetTagListForFile(const char* pakName, std::vector<SObjectTag>& out) const {
void GetTagListForFile(const char* pakName, std::vector<SObjectTag>& out) const override {
return x4_loader.GetTagListForFile(pakName, out);
}
std::shared_ptr<IDvdRequest> LoadResourceAsync(const urde::SObjectTag& tag, void* target) {
std::shared_ptr<IDvdRequest> LoadResourceAsync(const urde::SObjectTag& tag, void* target) override {
return x4_loader.LoadResourceAsync(tag, target);
}
std::shared_ptr<IDvdRequest> LoadResourcePartAsync(const urde::SObjectTag& tag, u32 off, u32 size, void* target) {
std::shared_ptr<IDvdRequest> LoadResourcePartAsync(const urde::SObjectTag& tag, u32 off, u32 size,
void* target) override {
return x4_loader.LoadResourcePartAsync(tag, off, size, target);
}
const SObjectTag* GetResourceIdByName(std::string_view name) const { return x4_loader.GetResourceIdByName(name); }
const SObjectTag* GetResourceIdByName(std::string_view name) const override {
return x4_loader.GetResourceIdByName(name);
}
FourCC GetResourceTypeById(CAssetId id) const { return x4_loader.GetResourceTypeById(id); }
FourCC GetResourceTypeById(CAssetId id) const override { return x4_loader.GetResourceTypeById(id); }
std::vector<std::pair<std::string, SObjectTag>> GetResourceIdToNameList() const {
return x4_loader.GetResourceIdToNameList();
}
void EnumerateResources(const std::function<bool(const SObjectTag&)>& lambda) const {
void EnumerateResources(const std::function<bool(const SObjectTag&)>& lambda) const override {
return x4_loader.EnumerateResources(lambda);
}
void EnumerateNamedResources(const std::function<bool(std::string_view, const SObjectTag&)>& lambda) const {
void EnumerateNamedResources(const std::function<bool(std::string_view, const SObjectTag&)>& lambda) const override {
return x4_loader.EnumerateNamedResources(lambda);
}
void LoadPersistentResources(CSimplePool& sp);
void UnloadPersistentResources() { m_nonWorldTokens.clear(); }
void LoadOriginalIDs(CSimplePool& sp);
CAssetId TranslateOriginalToNew(CAssetId id) const;
CAssetId TranslateNewToOriginal(CAssetId id) const;
void LoadOriginalIDs(CSimplePool& sp) override;
CAssetId TranslateOriginalToNew(CAssetId id) const override;
CAssetId TranslateNewToOriginal(CAssetId id) const override;
CResLoader* GetResLoader() { return &x4_loader; }
CFactoryMgr* GetFactoryMgr() { return &x5c_factoryMgr; }
CResLoader* GetResLoader() override { return &x4_loader; }
CFactoryMgr* GetFactoryMgr() override { return &x5c_factoryMgr; }
};
} // namespace urde