diff options
| author | Lioncash <mathew1800@gmail.com> | 2015-10-19 10:29:00 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2015-10-19 10:29:00 -0400 |
| commit | 695ffefef76c49c93ed68e3ab6c0ff200d5f59ae (patch) | |
| tree | e983497f675b02ab33e269b3d3623c1ee55dc9c6 /Source | |
| parent | dddc834c14fd8a46fc344772e8c0263fc03df68d (diff) | |
FifoAnalyzer: Replace loop with std::accumulate
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/FifoPlayer/FifoAnalyzer.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/Core/Core/FifoPlayer/FifoAnalyzer.cpp b/Source/Core/Core/FifoPlayer/FifoAnalyzer.cpp index 40cdcdf49e..e64c48f52e 100644 --- a/Source/Core/Core/FifoPlayer/FifoAnalyzer.cpp +++ b/Source/Core/Core/FifoPlayer/FifoAnalyzer.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include <algorithm> + #include "Common/Assert.h" #include "Core/ConfigManager.h" #include "Core/Core.h" @@ -109,15 +111,10 @@ void LoadCPReg(u32 subCmd, u32 value, CPMemory& cpMem) u32 CalculateVertexSize(int vatIndex, const CPMemory& cpMem) { - u32 vertexSize = 0; - int sizes[21]; CalculateVertexElementSizes(sizes, vatIndex, cpMem); - for (auto& size : sizes) - vertexSize += size; - - return vertexSize; + return std::accumulate(std::begin(sizes), std::end(sizes), 0U); } void CalculateVertexElementSizes(int sizes[], int vatIndex, const CPMemory& cpMem) |
