ams: globally prefer R_RETURN to return for ams::Result
This commit is contained in:
@@ -44,21 +44,21 @@ namespace ams::lr {
|
||||
/* Actual commands. */
|
||||
Result ResolveProgramPath(Path *out, ncm::ProgramId id) {
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->ResolveProgramPath(out, id);
|
||||
R_RETURN(m_interface->ResolveProgramPath(out, id));
|
||||
}
|
||||
|
||||
Result RegisterProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||
return m_interface->RegisterProgramPath(path, id, owner_id);
|
||||
R_RETURN(m_interface->RegisterProgramPath(path, id, owner_id));
|
||||
} else {
|
||||
return m_interface->RegisterProgramPathDeprecated(path, id);
|
||||
R_RETURN(m_interface->RegisterProgramPathDeprecated(path, id));
|
||||
}
|
||||
}
|
||||
|
||||
Result UnregisterProgramPath(ncm::ProgramId id) {
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->UnregisterProgramPath(id);
|
||||
R_RETURN(m_interface->UnregisterProgramPath(id));
|
||||
}
|
||||
|
||||
void RedirectProgramPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||
@@ -72,21 +72,21 @@ namespace ams::lr {
|
||||
|
||||
Result ResolveHtmlDocumentPath(Path *out, ncm::ProgramId id) {
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->ResolveHtmlDocumentPath(out, id);
|
||||
R_RETURN(m_interface->ResolveHtmlDocumentPath(out, id));
|
||||
}
|
||||
|
||||
Result RegisterHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
if (hos::GetVersion() >= hos::Version_9_0_0) {
|
||||
return m_interface->RegisterHtmlDocumentPath(path, id, owner_id);
|
||||
R_RETURN(m_interface->RegisterHtmlDocumentPath(path, id, owner_id));
|
||||
} else {
|
||||
return m_interface->RegisterHtmlDocumentPathDeprecated(path, id);
|
||||
R_RETURN(m_interface->RegisterHtmlDocumentPathDeprecated(path, id));
|
||||
}
|
||||
}
|
||||
|
||||
Result UnregisterHtmlDocumentPath(ncm::ProgramId id) {
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->UnregisterHtmlDocumentPath(id);
|
||||
R_RETURN(m_interface->UnregisterHtmlDocumentPath(id));
|
||||
}
|
||||
|
||||
void RedirectHtmlDocumentPath(const Path &path, ncm::ProgramId id, ncm::ProgramId owner_id) {
|
||||
@@ -100,12 +100,12 @@ namespace ams::lr {
|
||||
|
||||
Result Refresh() {
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->Refresh();
|
||||
R_RETURN(m_interface->Refresh());
|
||||
}
|
||||
|
||||
Result RefreshExcluding(const ncm::ProgramId *excluding_ids, size_t num_ids) {
|
||||
AMS_ASSERT(m_interface != nullptr);
|
||||
return m_interface->RefreshExcluding(sf::InArray<ncm::ProgramId>(excluding_ids, num_ids));
|
||||
R_RETURN(m_interface->RefreshExcluding(sf::InArray<ncm::ProgramId>(excluding_ids, num_ids)));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user