summaryrefslogtreecommitdiff
path: root/src/core/hle/service/apt
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2017-06-18 19:03:15 -0700
committerGravatar Yuri Kunde Schlesner2017-06-18 19:03:15 -0700
commit723dc644faa6e29250d1b7fa914dfb7c75d8aec5 (patch)
treec7ad927e2cbe1424046e279b3212ac895f4b1e87 /src/core/hle/service/apt
parentResultVal: Add an rvalue overload of Unwrap() (diff)
downloadyuzu-723dc644faa6e29250d1b7fa914dfb7c75d8aec5.tar.gz
yuzu-723dc644faa6e29250d1b7fa914dfb7c75d8aec5.tar.xz
yuzu-723dc644faa6e29250d1b7fa914dfb7c75d8aec5.zip
ResultVal: Remove MoveFrom()
Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in case you already have an rvalue.
Diffstat (limited to 'src/core/hle/service/apt')
-rw-r--r--src/core/hle/service/apt/apt.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp
index 4c587e3c8..25e7b777d 100644
--- a/src/core/hle/service/apt/apt.cpp
+++ b/src/core/hle/service/apt/apt.cpp
@@ -55,8 +55,8 @@ void Initialize(Service::Interface* self) {
55 u32 flags = rp.Pop<u32>(); 55 u32 flags = rp.Pop<u32>();
56 IPC::RequestBuilder rb = rp.MakeBuilder(1, 3); 56 IPC::RequestBuilder rb = rp.MakeBuilder(1, 3);
57 rb.Push(RESULT_SUCCESS); 57 rb.Push(RESULT_SUCCESS);
58 rb.PushCopyHandles(Kernel::g_handle_table.Create(notification_event).MoveFrom(), 58 rb.PushCopyHandles(Kernel::g_handle_table.Create(notification_event).Unwrap(),
59 Kernel::g_handle_table.Create(parameter_event).MoveFrom()); 59 Kernel::g_handle_table.Create(parameter_event).Unwrap());
60 60
61 // TODO(bunnei): Check if these events are cleared every time Initialize is called. 61 // TODO(bunnei): Check if these events are cleared every time Initialize is called.
62 notification_event->Clear(); 62 notification_event->Clear();
@@ -93,7 +93,7 @@ void GetSharedFont(Service::Interface* self) {
93 // allocated, the real APT service calculates this address by scanning the entire address space 93 // allocated, the real APT service calculates this address by scanning the entire address space
94 // (using svcQueryMemory) and searches for an allocation of the same size as the Shared Font. 94 // (using svcQueryMemory) and searches for an allocation of the same size as the Shared Font.
95 rb.Push(target_address); 95 rb.Push(target_address);
96 rb.PushCopyHandles(Kernel::g_handle_table.Create(shared_font_mem).MoveFrom()); 96 rb.PushCopyHandles(Kernel::g_handle_table.Create(shared_font_mem).Unwrap());
97} 97}
98 98
99void NotifyToWait(Service::Interface* self) { 99void NotifyToWait(Service::Interface* self) {
@@ -115,7 +115,7 @@ void GetLockHandle(Service::Interface* self) {
115 rb.Push(RESULT_SUCCESS); // No error 115 rb.Push(RESULT_SUCCESS); // No error
116 rb.Push(applet_attributes); // Applet Attributes, this value is passed to Enable. 116 rb.Push(applet_attributes); // Applet Attributes, this value is passed to Enable.
117 rb.Push<u32>(0); // Least significant bit = power button state 117 rb.Push<u32>(0); // Least significant bit = power button state
118 Kernel::Handle handle_copy = Kernel::g_handle_table.Create(lock).MoveFrom(); 118 Kernel::Handle handle_copy = Kernel::g_handle_table.Create(lock).Unwrap();
119 rb.PushCopyHandles(handle_copy); 119 rb.PushCopyHandles(handle_copy);
120 120
121 LOG_WARNING(Service_APT, "(STUBBED) called handle=0x%08X applet_attributes=0x%08X", handle_copy, 121 LOG_WARNING(Service_APT, "(STUBBED) called handle=0x%08X applet_attributes=0x%08X", handle_copy,
@@ -231,7 +231,7 @@ void ReceiveParameter(Service::Interface* self) {
231 rb.Push(static_cast<u32>(next_parameter.buffer.size())); // Parameter buffer size 231 rb.Push(static_cast<u32>(next_parameter.buffer.size())); // Parameter buffer size
232 232
233 rb.PushMoveHandles((next_parameter.object != nullptr) 233 rb.PushMoveHandles((next_parameter.object != nullptr)
234 ? Kernel::g_handle_table.Create(next_parameter.object).MoveFrom() 234 ? Kernel::g_handle_table.Create(next_parameter.object).Unwrap()
235 : 0); 235 : 0);
236 rb.PushStaticBuffer(buffer, static_cast<u32>(next_parameter.buffer.size()), 0); 236 rb.PushStaticBuffer(buffer, static_cast<u32>(next_parameter.buffer.size()), 0);
237 237
@@ -261,7 +261,7 @@ void GlanceParameter(Service::Interface* self) {
261 rb.Push(static_cast<u32>(next_parameter.buffer.size())); // Parameter buffer size 261 rb.Push(static_cast<u32>(next_parameter.buffer.size())); // Parameter buffer size
262 262
263 rb.PushCopyHandles((next_parameter.object != nullptr) 263 rb.PushCopyHandles((next_parameter.object != nullptr)
264 ? Kernel::g_handle_table.Create(next_parameter.object).MoveFrom() 264 ? Kernel::g_handle_table.Create(next_parameter.object).Unwrap()
265 : 0); 265 : 0);
266 rb.PushStaticBuffer(buffer, static_cast<u32>(next_parameter.buffer.size()), 0); 266 rb.PushStaticBuffer(buffer, static_cast<u32>(next_parameter.buffer.size()), 0);
267 267