summaryrefslogtreecommitdiff
path: root/src/core/hle/ipc_helpers.h
diff options
context:
space:
mode:
authorGravatar Lioncash2021-05-08 12:11:36 -0400
committerGravatar Lioncash2021-05-08 12:33:26 -0400
commit2f62bae9e3bbdd80cd374aaf0b93890e937d5b3d (patch)
treeda5cbd25dcb367559c1bf619a7438fa1e18ff600 /src/core/hle/ipc_helpers.h
parentMerge pull request #6266 from bunnei/kautoobject-refactor (diff)
downloadyuzu-2f62bae9e3bbdd80cd374aaf0b93890e937d5b3d.tar.gz
yuzu-2f62bae9e3bbdd80cd374aaf0b93890e937d5b3d.tar.xz
yuzu-2f62bae9e3bbdd80cd374aaf0b93890e937d5b3d.zip
kernel: Eliminate variable shadowing
Now that the large kernel refactor is merged, we can eliminate the remaining variable shadowing cases.
Diffstat (limited to 'src/core/hle/ipc_helpers.h')
-rw-r--r--src/core/hle/ipc_helpers.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.h
index 0906b8cfb..d136be452 100644
--- a/src/core/hle/ipc_helpers.h
+++ b/src/core/hle/ipc_helpers.h
@@ -69,16 +69,16 @@ public:
69 AlwaysMoveHandles = 1, 69 AlwaysMoveHandles = 1,
70 }; 70 };
71 71
72 explicit ResponseBuilder(Kernel::HLERequestContext& context, u32 normal_params_size, 72 explicit ResponseBuilder(Kernel::HLERequestContext& ctx, u32 normal_params_size,
73 u32 num_handles_to_copy = 0, u32 num_objects_to_move = 0, 73 u32 num_handles_to_copy = 0, u32 num_objects_to_move = 0,
74 Flags flags = Flags::None) 74 Flags flags = Flags::None)
75 : RequestHelperBase(context), normal_params_size(normal_params_size), 75 : RequestHelperBase(ctx), normal_params_size(normal_params_size),
76 num_handles_to_copy(num_handles_to_copy), 76 num_handles_to_copy(num_handles_to_copy),
77 num_objects_to_move(num_objects_to_move), kernel{context.kernel} { 77 num_objects_to_move(num_objects_to_move), kernel{ctx.kernel} {
78 78
79 memset(cmdbuf, 0, sizeof(u32) * IPC::COMMAND_BUFFER_LENGTH); 79 memset(cmdbuf, 0, sizeof(u32) * IPC::COMMAND_BUFFER_LENGTH);
80 80
81 context.ClearIncomingObjects(); 81 ctx.ClearIncomingObjects();
82 82
83 IPC::CommandHeader header{}; 83 IPC::CommandHeader header{};
84 84
@@ -90,13 +90,13 @@ public:
90 u32 num_domain_objects{}; 90 u32 num_domain_objects{};
91 const bool always_move_handles{ 91 const bool always_move_handles{
92 (static_cast<u32>(flags) & static_cast<u32>(Flags::AlwaysMoveHandles)) != 0}; 92 (static_cast<u32>(flags) & static_cast<u32>(Flags::AlwaysMoveHandles)) != 0};
93 if (!context.Session()->IsDomain() || always_move_handles) { 93 if (!ctx.Session()->IsDomain() || always_move_handles) {
94 num_handles_to_move = num_objects_to_move; 94 num_handles_to_move = num_objects_to_move;
95 } else { 95 } else {
96 num_domain_objects = num_objects_to_move; 96 num_domain_objects = num_objects_to_move;
97 } 97 }
98 98
99 if (context.Session()->IsDomain()) { 99 if (ctx.Session()->IsDomain()) {
100 raw_data_size += sizeof(DomainMessageHeader) / 4 + num_domain_objects; 100 raw_data_size += sizeof(DomainMessageHeader) / 4 + num_domain_objects;
101 } 101 }
102 102
@@ -116,7 +116,7 @@ public:
116 116
117 AlignWithPadding(); 117 AlignWithPadding();
118 118
119 if (context.Session()->IsDomain() && context.HasDomainMessageHeader()) { 119 if (ctx.Session()->IsDomain() && ctx.HasDomainMessageHeader()) {
120 IPC::DomainMessageHeader domain_header{}; 120 IPC::DomainMessageHeader domain_header{};
121 domain_header.num_objects = num_domain_objects; 121 domain_header.num_objects = num_domain_objects;
122 PushRaw(domain_header); 122 PushRaw(domain_header);
@@ -341,9 +341,9 @@ class RequestParser : public RequestHelperBase {
341public: 341public:
342 explicit RequestParser(u32* command_buffer) : RequestHelperBase(command_buffer) {} 342 explicit RequestParser(u32* command_buffer) : RequestHelperBase(command_buffer) {}
343 343
344 explicit RequestParser(Kernel::HLERequestContext& context) : RequestHelperBase(context) { 344 explicit RequestParser(Kernel::HLERequestContext& ctx) : RequestHelperBase(ctx) {
345 ASSERT_MSG(context.GetDataPayloadOffset(), "context is incomplete"); 345 ASSERT_MSG(ctx.GetDataPayloadOffset(), "context is incomplete");
346 Skip(context.GetDataPayloadOffset(), false); 346 Skip(ctx.GetDataPayloadOffset(), false);
347 // Skip the u64 command id, it's already stored in the context 347 // Skip the u64 command id, it's already stored in the context
348 static constexpr u32 CommandIdSize = 2; 348 static constexpr u32 CommandIdSize = 2;
349 Skip(CommandIdSize, false); 349 Skip(CommandIdSize, false);