mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-02-06 03:34:02 +00:00
reg_alloc: Use std::exchange
This commit is contained in:
parent
e0c12ec2ad
commit
4ce9c65cfb
@ -6,6 +6,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <numeric>
|
||||
#include <utility>
|
||||
|
||||
#include <xbyak.h>
|
||||
|
||||
@ -487,8 +488,7 @@ void RegAlloc::Move(HostLoc to, HostLoc from) {
|
||||
|
||||
EmitMove(to, from);
|
||||
|
||||
LocInfo(to) = LocInfo(from);
|
||||
LocInfo(from) = {};
|
||||
LocInfo(to) = std::exchange(LocInfo(from), {});
|
||||
}
|
||||
|
||||
void RegAlloc::CopyToScratch(HostLoc to, HostLoc from) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user