From beb95b75ca611489eb317d0b8726acd1bdf0877c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 30 Aug 2014 18:32:09 -0400 Subject: [PATCH] PPCAnalyst: Use std::swap instead of making a temporary variable --- Source/Core/Core/PowerPC/PPCAnalyst.cpp | 5 ++--- 1 file 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 #include #include @@ -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); } } }