strat: use m_ for member variables

This commit is contained in:
Michael Scire 2021-10-10 00:14:06 -07:00
parent ce28591ab2
commit a595c232b9
425 changed files with 8531 additions and 8484 deletions

View file

@ -23,13 +23,13 @@ namespace ams::lr {
class LocationResolver {
NON_COPYABLE(LocationResolver);
private:
sf::SharedPointer<ILocationResolver> interface;
sf::SharedPointer<ILocationResolver> m_interface;
public:
LocationResolver() { /* ... */ }
explicit LocationResolver(sf::SharedPointer<ILocationResolver> intf) : interface(intf) { /* ... */ }
explicit LocationResolver(sf::SharedPointer<ILocationResolver> intf) : m_interface(intf) { /* ... */ }
LocationResolver(LocationResolver &&rhs) {
this->interface = std::move(rhs.interface);
m_interface = std::move(rhs.m_interface);
}
LocationResolver &operator=(LocationResolver &&rhs) {
@ -38,137 +38,137 @@ namespace ams::lr {
}
void swap(LocationResolver &rhs) {
std::swap(this->interface, rhs.interface);
std::swap(m_interface, rhs.m_interface);
}
public:
Result ResolveProgramPath(Path *out, ncm::ProgramId id) {
AMS_ASSERT(this->interface != nullptr);
return this->interface->ResolveProgramPath(out, id);
AMS_ASSERT(m_interface != nullptr);
return m_interface->ResolveProgramPath(out, id);
}
void RedirectProgramPath(const Path &path, ncm::ProgramId id) {
AMS_ASSERT(this->interface != nullptr);
R_ABORT_UNLESS(this->interface->RedirectProgramPath(path, id));
AMS_ASSERT(m_interface != nullptr);
R_ABORT_UNLESS(m_interface->RedirectProgramPath(path, id));
}
Result ResolveApplicationControlPath(Path *out, ncm::ProgramId id) {
AMS_ASSERT(this->interface != nullptr);
return this->interface->ResolveApplicationControlPath(out, id);
AMS_ASSERT(m_interface != nullptr);
return m_interface->ResolveApplicationControlPath(out, id);
}
Result ResolveApplicationHtmlDocumentPath(Path *out, ncm::ProgramId id) {
AMS_ASSERT(this->interface != nullptr);
return this->interface->ResolveApplicationHtmlDocumentPath(out, id);
AMS_ASSERT(m_interface != nullptr);
return m_interface->ResolveApplicationHtmlDocumentPath(out, id);
}
Result ResolveDataPath(Path *out, ncm::DataId id) {
AMS_ASSERT(this->interface != nullptr);
return this->interface->ResolveDataPath(out, id);
AMS_ASSERT(m_interface != nullptr);
return m_interface->ResolveDataPath(out, id);
}
void RedirectApplicationControlPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
AMS_ASSERT(this->interface != nullptr);
AMS_ASSERT(m_interface != nullptr);
if (hos::GetVersion() >= hos::Version_9_0_0) {
R_ABORT_UNLESS(this->interface->RedirectApplicationControlPath(path, id, owner_id));
R_ABORT_UNLESS(m_interface->RedirectApplicationControlPath(path, id, owner_id));
} else {
R_ABORT_UNLESS(this->interface->RedirectApplicationControlPathDeprecated(path, id));
R_ABORT_UNLESS(m_interface->RedirectApplicationControlPathDeprecated(path, id));
}
}
void RedirectApplicationHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
AMS_ASSERT(this->interface != nullptr);
AMS_ASSERT(m_interface != nullptr);
if (hos::GetVersion() >= hos::Version_9_0_0) {
R_ABORT_UNLESS(this->interface->RedirectApplicationHtmlDocumentPath(path, id, owner_id));
R_ABORT_UNLESS(m_interface->RedirectApplicationHtmlDocumentPath(path, id, owner_id));
} else {
R_ABORT_UNLESS(this->interface->RedirectApplicationHtmlDocumentPathDeprecated(path, id));
R_ABORT_UNLESS(m_interface->RedirectApplicationHtmlDocumentPathDeprecated(path, id));
}
}
Result ResolveApplicationLegalInformationPath(Path *out, ncm::ProgramId id) {
AMS_ASSERT(this->interface != nullptr);
return this->interface->ResolveApplicationLegalInformationPath(out, id);
AMS_ASSERT(m_interface != nullptr);
return m_interface->ResolveApplicationLegalInformationPath(out, id);
}
void RedirectApplicationLegalInformationPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
AMS_ASSERT(this->interface != nullptr);
AMS_ASSERT(m_interface != nullptr);
if (hos::GetVersion() >= hos::Version_9_0_0) {
R_ABORT_UNLESS(this->interface->RedirectApplicationLegalInformationPath(path, id, owner_id));
R_ABORT_UNLESS(m_interface->RedirectApplicationLegalInformationPath(path, id, owner_id));
} else {
R_ABORT_UNLESS(this->interface->RedirectApplicationLegalInformationPathDeprecated(path, id));
R_ABORT_UNLESS(m_interface->RedirectApplicationLegalInformationPathDeprecated(path, id));
}
}
Result Refresh() {
AMS_ASSERT(this->interface != nullptr);
return this->interface->Refresh();
AMS_ASSERT(m_interface != nullptr);
return m_interface->Refresh();
}
void RedirectApplicationProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
AMS_ASSERT(this->interface != nullptr);
AMS_ASSERT(m_interface != nullptr);
if (hos::GetVersion() >= hos::Version_9_0_0) {
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPath(path, id, owner_id));
R_ABORT_UNLESS(m_interface->RedirectApplicationProgramPath(path, id, owner_id));
} else {
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPathDeprecated(path, id));
R_ABORT_UNLESS(m_interface->RedirectApplicationProgramPathDeprecated(path, id));
}
}
Result ClearApplicationRedirection() {
AMS_ASSERT(this->interface != nullptr);
AMS_ASSERT(m_interface != nullptr);
AMS_ASSERT(hos::GetVersion() < hos::Version_9_0_0);
return this->ClearApplicationRedirection(nullptr, 0);
}
Result ClearApplicationRedirection(const ncm::ProgramId *excluding_ids, size_t num_ids) {
AMS_ASSERT(this->interface != nullptr);
AMS_ASSERT(m_interface != nullptr);
if (hos::GetVersion() >= hos::Version_9_0_0) {
return this->interface->ClearApplicationRedirection(sf::InArray<ncm::ProgramId>(excluding_ids, num_ids));
return m_interface->ClearApplicationRedirection(sf::InArray<ncm::ProgramId>(excluding_ids, num_ids));
} else {
return this->interface->ClearApplicationRedirectionDeprecated();
return m_interface->ClearApplicationRedirectionDeprecated();
}
}
Result EraseProgramRedirection(ncm::ProgramId id) {
AMS_ASSERT(this->interface != nullptr);
return this->interface->EraseProgramRedirection(id);
AMS_ASSERT(m_interface != nullptr);
return m_interface->EraseProgramRedirection(id);
}
Result EraseApplicationControlRedirection(ncm::ProgramId id) {
AMS_ASSERT(this->interface != nullptr);
return this->interface->EraseApplicationControlRedirection(id);
AMS_ASSERT(m_interface != nullptr);
return m_interface->EraseApplicationControlRedirection(id);
}
Result EraseApplicationHtmlDocumentRedirection(ncm::ProgramId id) {
AMS_ASSERT(this->interface != nullptr);
return this->interface->EraseApplicationHtmlDocumentRedirection(id);
AMS_ASSERT(m_interface != nullptr);
return m_interface->EraseApplicationHtmlDocumentRedirection(id);
}
Result EraseApplicationLegalInformationRedirection(ncm::ProgramId id) {
AMS_ASSERT(this->interface != nullptr);
return this->interface->EraseApplicationLegalInformationRedirection(id);
AMS_ASSERT(m_interface != nullptr);
return m_interface->EraseApplicationLegalInformationRedirection(id);
}
Result ResolveProgramPathForDebug(Path *out, ncm::ProgramId id) {
AMS_ASSERT(this->interface != nullptr);
return this->interface->ResolveProgramPathForDebug(out, id);
AMS_ASSERT(m_interface != nullptr);
return m_interface->ResolveProgramPathForDebug(out, id);
}
void RedirectProgramPathForDebug(const Path &path, ncm::ProgramId id) {
AMS_ASSERT(this->interface != nullptr);
R_ABORT_UNLESS(this->interface->RedirectProgramPathForDebug(path, id));
AMS_ASSERT(m_interface != nullptr);
R_ABORT_UNLESS(m_interface->RedirectProgramPathForDebug(path, id));
}
void RedirectApplicationProgramPathForDebug(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
AMS_ASSERT(this->interface != nullptr);
AMS_ASSERT(m_interface != nullptr);
if (hos::GetVersion() >= hos::Version_9_0_0) {
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPathForDebug(path, id, owner_id));
R_ABORT_UNLESS(m_interface->RedirectApplicationProgramPathForDebug(path, id, owner_id));
} else {
R_ABORT_UNLESS(this->interface->RedirectApplicationProgramPathForDebugDeprecated(path, id));
R_ABORT_UNLESS(m_interface->RedirectApplicationProgramPathForDebugDeprecated(path, id));
}
}
Result EraseProgramRedirectionForDebug(ncm::ProgramId id) {
AMS_ASSERT(this->interface != nullptr);
return this->interface->EraseProgramRedirectionForDebug(id);
AMS_ASSERT(m_interface != nullptr);
return m_interface->EraseProgramRedirectionForDebug(id);
}
};