mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-02-19 22:59:36 +00:00
reg_alloc: Use std::exchange
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user