PPCAnalyst: Use std::swap instead of making a temporary variable
This commit is contained in:
parent
2c7bcd0d04
commit
beb95b75ca
|
@ -2,6 +2,7 @@
|
||||||
// Licensed under GPLv2
|
// Licensed under GPLv2
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -419,9 +420,7 @@ void PPCAnalyzer::ReorderInstructions(u32 instructions, CodeOp *code)
|
||||||
if (CanSwapAdjacentOps(a, b))
|
if (CanSwapAdjacentOps(a, b))
|
||||||
{
|
{
|
||||||
// Alright, let's bubble it down!
|
// Alright, let's bubble it down!
|
||||||
CodeOp c = a;
|
std::swap(a, b);
|
||||||
a = b;
|
|
||||||
b = c;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue