From 24860d83a9c2e9bc195586d544f2bebd9fc20ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 5 May 2018 20:41:39 +0200 Subject: [PATCH] Replace std::make_tuple with simpler syntax (#77) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * boot2: Simplify g_additional_launch_programs It appears that Stratosphère is targeting C++17. In C++17, std::make_tuple is not required for initialisating a tuple anymore. Same thing, but less typing * Replace std::make_tuple with {} More readable and less noise. Also fixes two missing return statements. --- include/stratosphere/ipc_templating.hpp | 2 +- include/stratosphere/servicesession.hpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/stratosphere/ipc_templating.hpp b/include/stratosphere/ipc_templating.hpp index 6ed6e3e5..25d6f7b1 100644 --- a/include/stratosphere/ipc_templating.hpp +++ b/include/stratosphere/ipc_templating.hpp @@ -457,4 +457,4 @@ Result WrapStaticIpcCommandImpl(IpcParsedCommand& r, IpcCommand &out_command, u8 auto result = std::apply(IpcCommandImpl, args); return std::apply(Encoder{out_command}, result); -} \ No newline at end of file +} diff --git a/include/stratosphere/servicesession.hpp b/include/stratosphere/servicesession.hpp index e730849d..09ed83a9 100644 --- a/include/stratosphere/servicesession.hpp +++ b/include/stratosphere/servicesession.hpp @@ -158,22 +158,22 @@ class ServiceSession : public IWaitable { /* Control commands. */ std::tuple ConvertCurrentObjectToDomain() { /* TODO */ - return std::make_tuple(0xF601); + return {0xF601}; } std::tuple CopyFromCurrentDomain() { /* TODO */ - return std::make_tuple(0xF601); + return {0xF601}; } std::tuple CloneCurrentObject() { /* TODO */ - return std::make_tuple(0xF601); + return {0xF601}; } std::tuple QueryPointerBufferSize() { - return std::make_tuple(0x0, (u32)sizeof(this->pointer_buffer)); + return {0x0, (u32)sizeof(this->pointer_buffer)}; } std::tuple 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; } -}; \ No newline at end of file +};