forked from eden-emu/eden
kernel: prefer std::addressof
This commit is contained in:
parent
641783df8f
commit
ac6cbb7134
21 changed files with 139 additions and 134 deletions
src/core/hle/kernel
|
@ -930,14 +930,14 @@ Result KThread::GetThreadContext3(std::vector<u8>& out) {
|
|||
context.pstate &= 0xFF0FFE20;
|
||||
|
||||
out.resize(sizeof(context));
|
||||
std::memcpy(out.data(), &context, sizeof(context));
|
||||
std::memcpy(out.data(), std::addressof(context), sizeof(context));
|
||||
} else {
|
||||
// Mask away mode bits, interrupt bits, IL bit, and other reserved bits.
|
||||
auto context = GetContext32();
|
||||
context.cpsr &= 0xFF0FFE20;
|
||||
|
||||
out.resize(sizeof(context));
|
||||
std::memcpy(out.data(), &context, sizeof(context));
|
||||
std::memcpy(out.data(), std::addressof(context), sizeof(context));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue