PM: Refactor for R_TRY, remove gotos

This commit is contained in:
Michael Scire 2019-06-17 15:27:29 -07:00
parent c60ee15449
commit ee40dcd76f
15 changed files with 126 additions and 165 deletions

View file

@ -13,14 +13,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <switch.h>
#include "pm_registration.hpp"
#include "pm_info.hpp"
Result InformationService::GetTitleId(Out<u64> tid, u64 pid) {
std::scoped_lock<ProcessList &> lk(Registration::GetProcessList());
std::shared_ptr<Registration::Process> proc = Registration::GetProcess(pid);
if (proc != NULL) {
tid.SetValue(proc->tid_sid.title_id);