summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-08-30 18:46:37 -0400
committerLioncash <mathew1800@gmail.com>2014-08-30 18:46:37 -0400
commitfe518af22df5c293e026b23ff3a68629a563c2bf (patch)
treeafde2795f28b86ea855a3aa25d843d4af3234836 /Source/Core
parent2c7bcd0d048c2e298a5d1e94cb493c6d879f6dd9 (diff)
parentbeb95b75ca611489eb317d0b8726acd1bdf0877c (diff)
Merge pull request #912 from lioncash/swap
PPCAnalyst: Use std::swap instead of making a temporary variable
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/PPCAnalyst.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/Core/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/PowerPC/PPCAnalyst.cpp
index 8b91a4917d..2c81a8447a 100644
--- a/Source/Core/Core/PowerPC/PPCAnalyst.cpp
+++ b/Source/Core/Core/PowerPC/PPCAnalyst.cpp
@@ -2,6 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
+#include <algorithm>
#include <queue>
#include <string>
@@ -419,9 +420,7 @@ void PPCAnalyzer::ReorderInstructions(u32 instructions, CodeOp *code)
if (CanSwapAdjacentOps(a, b))
{
// Alright, let's bubble it down!
- CodeOp c = a;
- a = b;
- b = c;
+ std::swap(a, b);
}
}
}