mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-04-23 21:14:49 +00:00
Replace std::make_tuple with {}
More readable and less noise. Also fixes two missing return statements.
This commit is contained in:
parent
9be32f123c
commit
fe11fb2647
10 changed files with 117 additions and 117 deletions
|
@ -66,83 +66,83 @@ void __appExit(void) {
|
|||
}
|
||||
|
||||
static const std::tuple<u32, bool, bool> g_gpio_map[] = {
|
||||
std::make_tuple(0xFFFFFFFF, false, false), /* Invalid */
|
||||
std::make_tuple(0x000000CC, true, false), /* Port Z, Pin 4 */
|
||||
std::make_tuple(0x00000024, true, false), /* Port E, Pin 4 */
|
||||
std::make_tuple(0x0000003C, true, false), /* Port H, Pin 4 */
|
||||
std::make_tuple(0x000000DA, false, true), /* Port BB, Pin 2 */
|
||||
std::make_tuple(0x000000DB, true, false), /* Port BB, Pin 3 */
|
||||
std::make_tuple(0x000000DC, false, false), /* Port BB, Pin 4 */
|
||||
std::make_tuple(0x00000025, true, false), /* Port E, Pin 5 */
|
||||
std::make_tuple(0x00000090, false, false), /* Port S, Pin 0 */
|
||||
std::make_tuple(0x00000091, false, false), /* Port S, Pin 1 */
|
||||
std::make_tuple(0x00000096, true, false), /* Port S, Pin 6 */
|
||||
std::make_tuple(0x00000097, false, true), /* Port S, Pin 7 */
|
||||
std::make_tuple(0x00000026, false, false), /* Port E, Pin 6 */
|
||||
std::make_tuple(0x00000005, true, false), /* Port A, Pin 5 */
|
||||
std::make_tuple(0x00000078, false, false), /* Port P, Pin 0 */
|
||||
std::make_tuple(0x00000093, false, true), /* Port S, Pin 3 */
|
||||
std::make_tuple(0x0000007D, false, false), /* Port P, Pin 5 */
|
||||
std::make_tuple(0x0000007C, false, false), /* Port P, Pin 4 */
|
||||
std::make_tuple(0x0000007B, false, false), /* Port P, Pin 3 */
|
||||
std::make_tuple(0x0000007A, false, false), /* Port P, Pin 2 */
|
||||
std::make_tuple(0x000000BC, false, true), /* Port X, Pin 4 */
|
||||
std::make_tuple(0x000000AE, false, false), /* Port V, Pin 6 */
|
||||
std::make_tuple(0x000000BA, false, false), /* Port X, Pin 2 */
|
||||
std::make_tuple(0x000000B9, false, true), /* Port X, Pin 1 */
|
||||
std::make_tuple(0x000000BD, false, false), /* Port X, Pin 5 */
|
||||
std::make_tuple(0x000000BE, false, true), /* Port X, Pin 6 */
|
||||
std::make_tuple(0x000000BF, false, true), /* Port X, Pin 7 */
|
||||
std::make_tuple(0x000000C0, false, true), /* Port Y, Pin 0 */
|
||||
std::make_tuple(0x000000C1, false, false), /* Port Y, Pin 1 */
|
||||
std::make_tuple(0x000000A9, true, false), /* Port V, Pin 1 */
|
||||
std::make_tuple(0x000000AA, true, false), /* Port V, Pin 2 */
|
||||
std::make_tuple(0x00000055, true, false), /* Port K, Pin 5 */
|
||||
std::make_tuple(0x000000AD, true, false), /* Port V, Pin 5 */
|
||||
std::make_tuple(0x000000C8, false, true), /* Port Z, Pin 0 */
|
||||
std::make_tuple(0x000000CA, false, false), /* Port Z, Pin 2 */
|
||||
std::make_tuple(0x000000CB, false, true), /* Port Z, Pin 3 */
|
||||
std::make_tuple(0x0000004F, true, false), /* Port J, Pin 7 */
|
||||
std::make_tuple(0x00000050, false, false), /* Port K, Pin 0 */
|
||||
std::make_tuple(0x00000051, false, false), /* Port K, Pin 1 */
|
||||
std::make_tuple(0x00000052, false, false), /* Port K, Pin 2 */
|
||||
std::make_tuple(0x00000054, false, true), /* Port K, Pin 4 */
|
||||
std::make_tuple(0x00000056, false, true), /* Port K, Pin 6 */
|
||||
std::make_tuple(0x00000057, false, true), /* Port K, Pin 7 */
|
||||
std::make_tuple(0x00000053, true, false), /* Port K, Pin 3 */
|
||||
std::make_tuple(0x000000E3, true, false), /* Port CC, Pin 3 */
|
||||
std::make_tuple(0x00000038, true, false), /* Port H, Pin 0 */
|
||||
std::make_tuple(0x00000039, true, false), /* Port H, Pin 1 */
|
||||
std::make_tuple(0x0000003B, true, false), /* Port H, Pin 3 */
|
||||
std::make_tuple(0x0000003D, false, false), /* Port H, Pin 5 */
|
||||
std::make_tuple(0x0000003F, true, false), /* Port H, Pin 7 */
|
||||
std::make_tuple(0x00000040, true, false), /* Port I, Pin 0 */
|
||||
std::make_tuple(0x00000041, true, false), /* Port I, Pin 1 */
|
||||
std::make_tuple(0x0000003E, false, false), /* Port H, Pin 6 */
|
||||
std::make_tuple(0x000000E2, false, true), /* Port CC, Pin 2 */
|
||||
std::make_tuple(0x000000E4, true, false), /* Port CC, Pin 4 */
|
||||
std::make_tuple(0x0000003A, false, false), /* Port H, Pin 2 */
|
||||
std::make_tuple(0x000000C9, false, true), /* Port Z, Pin 1 */
|
||||
std::make_tuple(0x0000004D, true, false), /* Port J, Pin 5 */
|
||||
std::make_tuple(0x00000058, true, false), /* Port L, Pin 0 */
|
||||
std::make_tuple(0x0000003E, false, false), /* Port H, Pin 6 */
|
||||
std::make_tuple(0x00000026, false, false), /* Port E, Pin 6 */
|
||||
std::make_tuple(0xFFFFFFFF, false, false), /* Invalid */
|
||||
std::make_tuple(0x00000033, false, false), /* Port G, Pin 3 */
|
||||
std::make_tuple(0x0000001C, false, false), /* Port D, Pin 4 */
|
||||
std::make_tuple(0x000000D9, false, false), /* Port BB, Pin 1 */
|
||||
std::make_tuple(0x0000000C, false, false), /* Port B, Pin 4 */
|
||||
std::make_tuple(0x0000000D, false, false), /* Port B, Pin 5 */
|
||||
std::make_tuple(0x00000021, false, false), /* Port E, Pin 1 */
|
||||
std::make_tuple(0x00000027, false, false), /* Port E, Pin 7 */
|
||||
std::make_tuple(0x00000092, false, false), /* Port S, Pin 2 */
|
||||
std::make_tuple(0x00000095, false, false), /* Port S, Pin 5 */
|
||||
std::make_tuple(0x00000098, false, false), /* Port T, Pin 0 */
|
||||
std::make_tuple(0x00000010, false, false), /* Port C, Pin 0 */
|
||||
std::make_tuple(0x00000011, false, false), /* Port C, Pin 1 */
|
||||
std::make_tuple(0x00000012, false, false), /* Port C, Pin 2 */
|
||||
std::make_tuple(0x00000042, false, false), /* Port I, Pin 2 */
|
||||
std::make_tuple(0x000000E6, false, false), /* Port CC, Pin 6 */
|
||||
{0xFFFFFFFF, false, false}, /* Invalid */
|
||||
{0x000000CC, true, false}, /* Port Z, Pin 4 */
|
||||
{0x00000024, true, false}, /* Port E, Pin 4 */
|
||||
{0x0000003C, true, false}, /* Port H, Pin 4 */
|
||||
{0x000000DA, false, true}, /* Port BB, Pin 2 */
|
||||
{0x000000DB, true, false}, /* Port BB, Pin 3 */
|
||||
{0x000000DC, false, false}, /* Port BB, Pin 4 */
|
||||
{0x00000025, true, false}, /* Port E, Pin 5 */
|
||||
{0x00000090, false, false}, /* Port S, Pin 0 */
|
||||
{0x00000091, false, false}, /* Port S, Pin 1 */
|
||||
{0x00000096, true, false}, /* Port S, Pin 6 */
|
||||
{0x00000097, false, true}, /* Port S, Pin 7 */
|
||||
{0x00000026, false, false}, /* Port E, Pin 6 */
|
||||
{0x00000005, true, false}, /* Port A, Pin 5 */
|
||||
{0x00000078, false, false}, /* Port P, Pin 0 */
|
||||
{0x00000093, false, true}, /* Port S, Pin 3 */
|
||||
{0x0000007D, false, false}, /* Port P, Pin 5 */
|
||||
{0x0000007C, false, false}, /* Port P, Pin 4 */
|
||||
{0x0000007B, false, false}, /* Port P, Pin 3 */
|
||||
{0x0000007A, false, false}, /* Port P, Pin 2 */
|
||||
{0x000000BC, false, true}, /* Port X, Pin 4 */
|
||||
{0x000000AE, false, false}, /* Port V, Pin 6 */
|
||||
{0x000000BA, false, false}, /* Port X, Pin 2 */
|
||||
{0x000000B9, false, true}, /* Port X, Pin 1 */
|
||||
{0x000000BD, false, false}, /* Port X, Pin 5 */
|
||||
{0x000000BE, false, true}, /* Port X, Pin 6 */
|
||||
{0x000000BF, false, true}, /* Port X, Pin 7 */
|
||||
{0x000000C0, false, true}, /* Port Y, Pin 0 */
|
||||
{0x000000C1, false, false}, /* Port Y, Pin 1 */
|
||||
{0x000000A9, true, false}, /* Port V, Pin 1 */
|
||||
{0x000000AA, true, false}, /* Port V, Pin 2 */
|
||||
{0x00000055, true, false}, /* Port K, Pin 5 */
|
||||
{0x000000AD, true, false}, /* Port V, Pin 5 */
|
||||
{0x000000C8, false, true}, /* Port Z, Pin 0 */
|
||||
{0x000000CA, false, false}, /* Port Z, Pin 2 */
|
||||
{0x000000CB, false, true}, /* Port Z, Pin 3 */
|
||||
{0x0000004F, true, false}, /* Port J, Pin 7 */
|
||||
{0x00000050, false, false}, /* Port K, Pin 0 */
|
||||
{0x00000051, false, false}, /* Port K, Pin 1 */
|
||||
{0x00000052, false, false}, /* Port K, Pin 2 */
|
||||
{0x00000054, false, true}, /* Port K, Pin 4 */
|
||||
{0x00000056, false, true}, /* Port K, Pin 6 */
|
||||
{0x00000057, false, true}, /* Port K, Pin 7 */
|
||||
{0x00000053, true, false}, /* Port K, Pin 3 */
|
||||
{0x000000E3, true, false}, /* Port CC, Pin 3 */
|
||||
{0x00000038, true, false}, /* Port H, Pin 0 */
|
||||
{0x00000039, true, false}, /* Port H, Pin 1 */
|
||||
{0x0000003B, true, false}, /* Port H, Pin 3 */
|
||||
{0x0000003D, false, false}, /* Port H, Pin 5 */
|
||||
{0x0000003F, true, false}, /* Port H, Pin 7 */
|
||||
{0x00000040, true, false}, /* Port I, Pin 0 */
|
||||
{0x00000041, true, false}, /* Port I, Pin 1 */
|
||||
{0x0000003E, false, false}, /* Port H, Pin 6 */
|
||||
{0x000000E2, false, true}, /* Port CC, Pin 2 */
|
||||
{0x000000E4, true, false}, /* Port CC, Pin 4 */
|
||||
{0x0000003A, false, false}, /* Port H, Pin 2 */
|
||||
{0x000000C9, false, true}, /* Port Z, Pin 1 */
|
||||
{0x0000004D, true, false}, /* Port J, Pin 5 */
|
||||
{0x00000058, true, false}, /* Port L, Pin 0 */
|
||||
{0x0000003E, false, false}, /* Port H, Pin 6 */
|
||||
{0x00000026, false, false}, /* Port E, Pin 6 */
|
||||
{0xFFFFFFFF, false, false}, /* Invalid */
|
||||
{0x00000033, false, false}, /* Port G, Pin 3 */
|
||||
{0x0000001C, false, false}, /* Port D, Pin 4 */
|
||||
{0x000000D9, false, false}, /* Port BB, Pin 1 */
|
||||
{0x0000000C, false, false}, /* Port B, Pin 4 */
|
||||
{0x0000000D, false, false}, /* Port B, Pin 5 */
|
||||
{0x00000021, false, false}, /* Port E, Pin 1 */
|
||||
{0x00000027, false, false}, /* Port E, Pin 7 */
|
||||
{0x00000092, false, false}, /* Port S, Pin 2 */
|
||||
{0x00000095, false, false}, /* Port S, Pin 5 */
|
||||
{0x00000098, false, false}, /* Port T, Pin 0 */
|
||||
{0x00000010, false, false}, /* Port C, Pin 0 */
|
||||
{0x00000011, false, false}, /* Port C, Pin 1 */
|
||||
{0x00000012, false, false}, /* Port C, Pin 2 */
|
||||
{0x00000042, false, false}, /* Port I, Pin 2 */
|
||||
{0x000000E6, false, false}, /* Port CC, Pin 6 */
|
||||
};
|
||||
|
||||
int gpio_configure(unsigned int gpio_pad_name) {
|
||||
|
|
|
@ -451,4 +451,4 @@ Result WrapStaticIpcCommandImpl(IpcParsedCommand& r, IpcCommand &out_command, u8
|
|||
auto result = std::apply(IpcCommandImpl, args);
|
||||
|
||||
return std::apply(Encoder<OutArgs>{out_command}, result);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -158,22 +158,22 @@ class ServiceSession : public IWaitable {
|
|||
/* Control commands. */
|
||||
std::tuple<Result> ConvertCurrentObjectToDomain() {
|
||||
/* TODO */
|
||||
return std::make_tuple(0xF601);
|
||||
return {0xF601};
|
||||
}
|
||||
std::tuple<Result> CopyFromCurrentDomain() {
|
||||
/* TODO */
|
||||
return std::make_tuple(0xF601);
|
||||
return {0xF601};
|
||||
}
|
||||
std::tuple<Result> CloneCurrentObject() {
|
||||
/* TODO */
|
||||
return std::make_tuple(0xF601);
|
||||
return {0xF601};
|
||||
}
|
||||
std::tuple<Result, u32> QueryPointerBufferSize() {
|
||||
return std::make_tuple(0x0, (u32)sizeof(this->pointer_buffer));
|
||||
return {0x0, (u32)sizeof(this->pointer_buffer)};
|
||||
}
|
||||
std::tuple<Result> CloneCurrentObjectEx() {
|
||||
/* TODO */
|
||||
return std::make_tuple(0xF601);
|
||||
return {0xF601};
|
||||
}
|
||||
|
||||
Result dispatch_control_command(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id) {
|
||||
|
@ -202,4 +202,4 @@ class ServiceSession : public IWaitable {
|
|||
|
||||
return rc;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
@ -27,13 +27,13 @@ Result DebugMonitorService::dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64
|
|||
|
||||
std::tuple<Result> DebugMonitorService::add_title_to_launch_queue(u64 tid, InPointer<char> args) {
|
||||
fprintf(stderr, "Add to launch queue: %p, %X\n", args.pointer, args.num_elements);
|
||||
return std::make_tuple(LaunchQueue::add(tid, args.pointer, args.num_elements));
|
||||
return {LaunchQueue::add(tid, args.pointer, args.num_elements)};
|
||||
}
|
||||
|
||||
std::tuple<Result> DebugMonitorService::clear_launch_queue(u64 dat) {
|
||||
fprintf(stderr, "Clear launch queue: %lx\n", dat);
|
||||
LaunchQueue::clear();
|
||||
return std::make_tuple(0);
|
||||
return {0};
|
||||
}
|
||||
|
||||
std::tuple<Result, u32> DebugMonitorService::get_nso_info(u64 pid, OutPointerWithClientSize<Registration::NsoInfo> out) {
|
||||
|
@ -43,5 +43,5 @@ std::tuple<Result, u32> DebugMonitorService::get_nso_info(u64 pid, OutPointerWit
|
|||
|
||||
Result rc = Registration::GetNsoInfosForProcessId(out.pointer, out.num_elements, pid, &out_num_nsos);
|
||||
|
||||
return std::make_tuple(rc, out_num_nsos);
|
||||
}
|
||||
return {rc, out_num_nsos};
|
||||
}
|
||||
|
|
|
@ -39,12 +39,12 @@ std::tuple<Result, MovedHandle> ProcessManagerService::create_process(u64 flags,
|
|||
|
||||
rc = Registration::GetRegisteredTidSid(index, &tid_sid);
|
||||
if (R_FAILED(rc)) {
|
||||
std::make_tuple(rc, MovedHandle{process_h});
|
||||
return {rc, MovedHandle{process_h}};
|
||||
}
|
||||
|
||||
rc = ContentManagement::GetContentPathForTidSid(nca_path, &tid_sid);
|
||||
if (R_FAILED(rc)) {
|
||||
std::make_tuple(rc, MovedHandle{process_h});
|
||||
return {rc, MovedHandle{process_h}};
|
||||
}
|
||||
|
||||
launch_item = LaunchQueue::get_item(tid_sid.title_id);
|
||||
|
@ -55,7 +55,7 @@ std::tuple<Result, MovedHandle> ProcessManagerService::create_process(u64 flags,
|
|||
ContentManagement::SetCreatedTitle(tid_sid.title_id);
|
||||
}
|
||||
|
||||
return std::make_tuple(rc, MovedHandle{process_h});
|
||||
return {rc, MovedHandle{process_h}};
|
||||
}
|
||||
|
||||
std::tuple<Result> ProcessManagerService::get_program_info(Registration::TidSid tid_sid, OutPointerWithServerSize<ProcessManagerService::ProgramInfo, 0x1> out_program_info) {
|
||||
|
@ -67,40 +67,40 @@ std::tuple<Result> ProcessManagerService::get_program_info(Registration::TidSid
|
|||
rc = populate_program_info_buffer(out_program_info.pointer, &tid_sid);
|
||||
|
||||
if (R_FAILED(rc)) {
|
||||
return std::make_tuple(rc);
|
||||
return {rc};
|
||||
}
|
||||
|
||||
if (tid_sid.title_id != out_program_info.pointer->title_id) {
|
||||
rc = ContentManagement::GetContentPathForTidSid(nca_path, &tid_sid);
|
||||
if (R_FAILED(rc)) {
|
||||
return std::make_tuple(rc);
|
||||
return {rc};
|
||||
}
|
||||
|
||||
rc = ContentManagement::SetContentPath(nca_path, out_program_info.pointer->title_id, tid_sid.storage_id);
|
||||
if (R_FAILED(rc)) {
|
||||
return std::make_tuple(rc);
|
||||
return {rc};
|
||||
}
|
||||
|
||||
rc = LaunchQueue::add_copy(tid_sid.title_id, out_program_info.pointer->title_id);
|
||||
}
|
||||
|
||||
return std::make_tuple(rc);
|
||||
return {rc};
|
||||
}
|
||||
|
||||
std::tuple<Result, u64> ProcessManagerService::register_title(Registration::TidSid tid_sid) {
|
||||
u64 out_index = 0;
|
||||
if (Registration::RegisterTidSid(&tid_sid, &out_index)) {
|
||||
return std::make_tuple(0, out_index);
|
||||
return {0, out_index};
|
||||
} else {
|
||||
return std::make_tuple(0xE09, out_index);
|
||||
return {0xE09, out_index};
|
||||
}
|
||||
}
|
||||
|
||||
std::tuple<Result> ProcessManagerService::unregister_title(u64 index) {
|
||||
if (Registration::UnregisterIndex(index)) {
|
||||
return std::make_tuple(0);
|
||||
return {0};
|
||||
} else {
|
||||
return std::make_tuple(0x1009);
|
||||
return {0x1009};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -161,4 +161,4 @@ Result ProcessManagerService::populate_program_info_buffer(ProcessManagerService
|
|||
|
||||
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ std::tuple<Result, u64> RelocatableObjectsService::load_nro(PidDescriptor pid_de
|
|||
|
||||
rc = NroUtils::LoadNro(target_proc, this->process_handle, nro_address, nro_size, bss_address, bss_size, &out_address);
|
||||
LOAD_NRO_END:
|
||||
return std::make_tuple(rc, out_address);
|
||||
return {rc, out_address};
|
||||
}
|
||||
|
||||
std::tuple<Result> RelocatableObjectsService::unload_nro(PidDescriptor pid_desc, u64 nro_address) {
|
||||
|
@ -133,7 +133,7 @@ LOAD_NRR_END:
|
|||
nrr_info.Close();
|
||||
}
|
||||
}
|
||||
return std::make_tuple(rc);
|
||||
return {rc};
|
||||
}
|
||||
|
||||
std::tuple<Result> RelocatableObjectsService::unload_nrr(PidDescriptor pid_desc, u64 nrr_address) {
|
||||
|
@ -166,5 +166,5 @@ std::tuple<Result> RelocatableObjectsService::initialize(PidDescriptor pid_desc,
|
|||
this->has_initialized = true;
|
||||
rc = 0;
|
||||
}
|
||||
return std::make_tuple(rc);
|
||||
return {rc};
|
||||
}
|
||||
|
|
|
@ -21,11 +21,11 @@ Result ShellService::dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id
|
|||
|
||||
std::tuple<Result> ShellService::add_title_to_launch_queue(u64 tid, InPointer<char> args) {
|
||||
fprintf(stderr, "Add to launch queue: %p, %X\n", args.pointer, args.num_elements);
|
||||
return std::make_tuple(LaunchQueue::add(tid, args.pointer, args.num_elements));
|
||||
return {LaunchQueue::add(tid, args.pointer, args.num_elements)};
|
||||
}
|
||||
|
||||
std::tuple<Result> ShellService::clear_launch_queue(u64 dat) {
|
||||
fprintf(stderr, "Clear launch queue: %lx\n", dat);
|
||||
LaunchQueue::clear();
|
||||
return std::make_tuple(0);
|
||||
}
|
||||
return {0};
|
||||
}
|
||||
|
|
|
@ -24,10 +24,10 @@ Result BootModeService::handle_deferred() {
|
|||
}
|
||||
|
||||
std::tuple<Result, bool> BootModeService::get_boot_mode() {
|
||||
return std::make_tuple(0, g_is_maintenance_boot);
|
||||
return {0, g_is_maintenance_boot};
|
||||
}
|
||||
|
||||
std::tuple<Result> BootModeService::set_maintenance_boot() {
|
||||
g_is_maintenance_boot = true;
|
||||
return std::make_tuple(0);
|
||||
}
|
||||
return {0};
|
||||
}
|
||||
|
|
|
@ -24,9 +24,9 @@ Result ManagerService::handle_deferred() {
|
|||
|
||||
|
||||
std::tuple<Result> ManagerService::register_process(u64 pid, InBuffer<u8> acid_sac, InBuffer<u8> aci0_sac) {
|
||||
return std::make_tuple(Registration::RegisterProcess(pid, acid_sac.buffer, acid_sac.num_elements, aci0_sac.buffer, aci0_sac.num_elements));
|
||||
return {Registration::RegisterProcess(pid, acid_sac.buffer, acid_sac.num_elements, aci0_sac.buffer, aci0_sac.num_elements)};
|
||||
}
|
||||
|
||||
std::tuple<Result> ManagerService::unregister_process(u64 pid) {
|
||||
return std::make_tuple(Registration::UnregisterProcess(pid));
|
||||
}
|
||||
return {Registration::UnregisterProcess(pid)};
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ Result UserService::handle_deferred() {
|
|||
std::tuple<Result> UserService::initialize(PidDescriptor pid) {
|
||||
this->pid = pid.pid;
|
||||
this->has_initialized = true;
|
||||
return std::make_tuple(0);
|
||||
return {0};
|
||||
}
|
||||
|
||||
std::tuple<Result, MovedHandle> UserService::get_service(u64 service) {
|
||||
|
@ -51,13 +51,13 @@ std::tuple<Result, MovedHandle> UserService::get_service(u64 service) {
|
|||
if (rc == RESULT_DEFER_SESSION) {
|
||||
this->deferred_service = service;
|
||||
}
|
||||
return std::make_tuple(rc, MovedHandle{session_h});
|
||||
return {rc, MovedHandle{session_h}};
|
||||
}
|
||||
|
||||
std::tuple<Result, MovedHandle> UserService::deferred_get_service(u64 service) {
|
||||
Handle session_h = 0;
|
||||
Result rc = Registration::GetServiceHandle(service, &session_h);
|
||||
return std::make_tuple(rc, MovedHandle{session_h});
|
||||
return {rc, MovedHandle{session_h}};
|
||||
}
|
||||
|
||||
std::tuple<Result, MovedHandle> UserService::register_service(u64 service, u8 is_light, u32 max_sessions) {
|
||||
|
@ -71,7 +71,7 @@ std::tuple<Result, MovedHandle> UserService::register_service(u64 service, u8 is
|
|||
if (this->has_initialized) {
|
||||
rc = Registration::RegisterServiceForPid(this->pid, service, max_sessions, is_light != 0, &service_h);
|
||||
}
|
||||
return std::make_tuple(rc, MovedHandle{service_h});
|
||||
return {rc, MovedHandle{service_h}};
|
||||
}
|
||||
|
||||
std::tuple<Result> UserService::unregister_service(u64 service) {
|
||||
|
@ -84,5 +84,5 @@ std::tuple<Result> UserService::unregister_service(u64 service) {
|
|||
if (this->has_initialized) {
|
||||
rc = Registration::UnregisterServiceForPid(this->pid, service);
|
||||
}
|
||||
return std::make_tuple(rc);
|
||||
return {rc};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue