mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
hle: ipc_helpers: Add methods for copy/move references.
This commit is contained in:
parent
cfa7b92563
commit
eba3bb9d21
1 changed files with 24 additions and 2 deletions
|
@ -217,9 +217,15 @@ public:
|
||||||
template <typename... O>
|
template <typename... O>
|
||||||
void PushMoveObjects(O*... pointers);
|
void PushMoveObjects(O*... pointers);
|
||||||
|
|
||||||
|
template <typename... O>
|
||||||
|
void PushMoveObjects(O&... pointers);
|
||||||
|
|
||||||
template <typename... O>
|
template <typename... O>
|
||||||
void PushCopyObjects(O*... pointers);
|
void PushCopyObjects(O*... pointers);
|
||||||
|
|
||||||
|
template <typename... O>
|
||||||
|
void PushCopyObjects(O&... pointers);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
u32 normal_params_size{};
|
u32 normal_params_size{};
|
||||||
u32 num_handles_to_copy{};
|
u32 num_handles_to_copy{};
|
||||||
|
@ -304,7 +310,15 @@ template <typename... O>
|
||||||
inline void ResponseBuilder::PushCopyObjects(O*... pointers) {
|
inline void ResponseBuilder::PushCopyObjects(O*... pointers) {
|
||||||
auto objects = {pointers...};
|
auto objects = {pointers...};
|
||||||
for (auto& object : objects) {
|
for (auto& object : objects) {
|
||||||
context->AddCopyObject(std::move(object));
|
context->AddCopyObject(object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename... O>
|
||||||
|
inline void ResponseBuilder::PushCopyObjects(O&... pointers) {
|
||||||
|
auto objects = {&pointers...};
|
||||||
|
for (auto& object : objects) {
|
||||||
|
context->AddCopyObject(object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,7 +326,15 @@ template <typename... O>
|
||||||
inline void ResponseBuilder::PushMoveObjects(O*... pointers) {
|
inline void ResponseBuilder::PushMoveObjects(O*... pointers) {
|
||||||
auto objects = {pointers...};
|
auto objects = {pointers...};
|
||||||
for (auto& object : objects) {
|
for (auto& object : objects) {
|
||||||
context->AddMoveObject(std::move(object));
|
context->AddMoveObject(object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename... O>
|
||||||
|
inline void ResponseBuilder::PushMoveObjects(O&... pointers) {
|
||||||
|
auto objects = {&pointers...};
|
||||||
|
for (auto& object : objects) {
|
||||||
|
context->AddMoveObject(object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue