summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-24 04:40:24 +0200
committerLioncash <mathew1800@gmail.com>2018-07-24 04:40:24 +0200
commit22fd3f0026e42b15d50aef1e6ddc12a8cddea452 (patch)
tree600fa9880a7028d1ac7a0d28e0da24173c66a4f3 /src
parentipc_helpers: Make member variables of ResponseBuilder private (diff)
downloadyuzu-22fd3f0026e42b15d50aef1e6ddc12a8cddea452.tar
yuzu-22fd3f0026e42b15d50aef1e6ddc12a8cddea452.tar.gz
yuzu-22fd3f0026e42b15d50aef1e6ddc12a8cddea452.tar.bz2
yuzu-22fd3f0026e42b15d50aef1e6ddc12a8cddea452.tar.lz
yuzu-22fd3f0026e42b15d50aef1e6ddc12a8cddea452.tar.xz
yuzu-22fd3f0026e42b15d50aef1e6ddc12a8cddea452.tar.zst
yuzu-22fd3f0026e42b15d50aef1e6ddc12a8cddea452.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/ipc_helpers.h23
-rw-r--r--src/core/hle/kernel/hle_ipc.h2
2 files changed, 13 insertions, 12 deletions
diff --git a/src/core/hle/ipc_helpers.h b/src/core/hle/ipc_helpers.h
index 6a5e43899..f5bd27a75 100644
--- a/src/core/hle/ipc_helpers.h
+++ b/src/core/hle/ipc_helpers.h
@@ -25,9 +25,9 @@ protected:
ptrdiff_t index = 0;
public:
- RequestHelperBase(u32* command_buffer) : cmdbuf(command_buffer) {}
+ explicit RequestHelperBase(u32* command_buffer) : cmdbuf(command_buffer) {}
- RequestHelperBase(Kernel::HLERequestContext& context)
+ explicit RequestHelperBase(Kernel::HLERequestContext& context)
: context(&context), cmdbuf(context.CommandBuffer()) {}
void Skip(unsigned size_in_words, bool set_to_null) {
@@ -56,8 +56,6 @@ public:
class ResponseBuilder : public RequestHelperBase {
public:
- ResponseBuilder(u32* command_buffer) : RequestHelperBase(command_buffer) {}
-
/// Flags used for customizing the behavior of ResponseBuilder
enum class Flags : u32 {
None = 0,
@@ -66,9 +64,11 @@ public:
AlwaysMoveHandles = 1,
};
- ResponseBuilder(Kernel::HLERequestContext& context, u32 normal_params_size,
- u32 num_handles_to_copy = 0, u32 num_objects_to_move = 0,
- Flags flags = Flags::None)
+ explicit ResponseBuilder(u32* command_buffer) : RequestHelperBase(command_buffer) {}
+
+ explicit ResponseBuilder(Kernel::HLERequestContext& context, u32 normal_params_size,
+ u32 num_handles_to_copy = 0, u32 num_objects_to_move = 0,
+ Flags flags = Flags::None)
: RequestHelperBase(context), normal_params_size(normal_params_size),
num_handles_to_copy(num_handles_to_copy), num_objects_to_move(num_objects_to_move) {
@@ -274,9 +274,9 @@ inline void ResponseBuilder::PushMoveObjects(Kernel::SharedPtr<O>... pointers) {
class RequestParser : public RequestHelperBase {
public:
- RequestParser(u32* command_buffer) : RequestHelperBase(command_buffer) {}
+ explicit RequestParser(u32* command_buffer) : RequestHelperBase(command_buffer) {}
- RequestParser(Kernel::HLERequestContext& context) : RequestHelperBase(context) {
+ explicit RequestParser(Kernel::HLERequestContext& context) : RequestHelperBase(context) {
ASSERT_MSG(context.GetDataPayloadOffset(), "context is incomplete");
Skip(context.GetDataPayloadOffset(), false);
// Skip the u64 command id, it's already stored in the context
@@ -286,8 +286,9 @@ public:
ResponseBuilder MakeBuilder(u32 normal_params_size, u32 num_handles_to_copy,
u32 num_handles_to_move,
- ResponseBuilder::Flags flags = ResponseBuilder::Flags::None) {
- return {*context, normal_params_size, num_handles_to_copy, num_handles_to_move, flags};
+ ResponseBuilder::Flags flags = ResponseBuilder::Flags::None) const {
+ return ResponseBuilder{*context, normal_params_size, num_handles_to_copy,
+ num_handles_to_move, flags};
}
template <typename T>
diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h
index 01b805df8..84727f748 100644
--- a/src/core/hle/kernel/hle_ipc.h
+++ b/src/core/hle/kernel/hle_ipc.h
@@ -91,7 +91,7 @@ protected:
*/
class HLERequestContext {
public:
- HLERequestContext(SharedPtr<Kernel::ServerSession> session);
+ explicit HLERequestContext(SharedPtr<ServerSession> session);
~HLERequestContext();
/// Returns a pointer to the IPC command buffer for this request.