diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp index 0c69499355..81219201bc 100644 --- a/Source/Core/VideoCommon/Statistics.cpp +++ b/Source/Core/VideoCommon/Statistics.cpp @@ -3,20 +3,13 @@ // Refer to the license.txt file included. #include +#include #include "Statistics.h" #include "VertexLoaderManager.h" Statistics stats; -template -void Xchg(T& a, T&b) -{ - T c = a; - a = b; - b = c; -} - void Statistics::ResetFrame() { memset(&thisFrame, 0, sizeof(ThisFrame)); @@ -24,10 +17,10 @@ void Statistics::ResetFrame() void Statistics::SwapDL() { - Xchg(stats.thisFrame.numDLPrims, stats.thisFrame.numPrims); - Xchg(stats.thisFrame.numXFLoadsInDL, stats.thisFrame.numXFLoads); - Xchg(stats.thisFrame.numCPLoadsInDL, stats.thisFrame.numCPLoads); - Xchg(stats.thisFrame.numBPLoadsInDL, stats.thisFrame.numBPLoads); + std::swap(stats.thisFrame.numDLPrims, stats.thisFrame.numPrims); + std::swap(stats.thisFrame.numXFLoadsInDL, stats.thisFrame.numXFLoads); + std::swap(stats.thisFrame.numCPLoadsInDL, stats.thisFrame.numCPLoads); + std::swap(stats.thisFrame.numBPLoadsInDL, stats.thisFrame.numBPLoads); } char *Statistics::ToString(char *ptr)