From a9663669dc1037a04e37ae30efe18c0650547ac5 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 1 Jun 2019 07:55:09 -0400 Subject: Common/CommonFuncs: Remove now-unneccessary ArraySize function Since C++17, non-member std::size() is present in the standard library which also operates on regular C arrays. Given that, we can just replace usages of ArraySize with that where applicable. In many cases, we can just change the actual C array ArraySize() was called on into a std::array and just use its .size() member function instead. In some other cases, we can collapse the loops they were used in, into a ranged-for loop, eliminating the need for en explicit bounds query. --- Source/Core/VideoBackends/OGL/PerfQuery.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/PerfQuery.cpp') diff --git a/Source/Core/VideoBackends/OGL/PerfQuery.cpp b/Source/Core/VideoBackends/OGL/PerfQuery.cpp index 77471cee19..61cc951ce7 100644 --- a/Source/Core/VideoBackends/OGL/PerfQuery.cpp +++ b/Source/Core/VideoBackends/OGL/PerfQuery.cpp @@ -4,7 +4,6 @@ #include -#include "Common/CommonFuncs.h" #include "Common/CommonTypes.h" #include "Common/GL/GLExtensions/GLExtensions.h" @@ -54,7 +53,7 @@ void PerfQuery::FlushResults() void PerfQuery::ResetQuery() { m_query_count = 0; - std::fill_n(m_results, ArraySize(m_results), 0); + std::fill(std::begin(m_results), std::end(m_results), 0); } u32 PerfQuery::GetQueryResult(PerfQueryType type) -- cgit v1.2.3