From ba01f6dba3cf1858ed64bc7f1abee744ffd313ec Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 10 May 2018 19:06:19 -0400 Subject: CommonFuncs: Convert ROUND_UP_POW2 macro to a function Also move it to MathUtils where it belongs with the rest of the power-of-two functions. This gets rid of pollution of the current scope of any translation unit with b macros that aren't intended to be used directly. --- Source/Core/VideoBackends/OGL/StreamBuffer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/StreamBuffer.cpp') diff --git a/Source/Core/VideoBackends/OGL/StreamBuffer.cpp b/Source/Core/VideoBackends/OGL/StreamBuffer.cpp index 1307350086..e32afd9a47 100644 --- a/Source/Core/VideoBackends/OGL/StreamBuffer.cpp +++ b/Source/Core/VideoBackends/OGL/StreamBuffer.cpp @@ -5,8 +5,8 @@ #include "VideoBackends/OGL/StreamBuffer.h" #include "Common/Align.h" -#include "Common/CommonFuncs.h" #include "Common/GL/GLUtil.h" +#include "Common/MathUtil.h" #include "Common/MemoryUtil.h" #include "VideoBackends/OGL/Render.h" @@ -25,8 +25,8 @@ static u32 GenBuffer() } StreamBuffer::StreamBuffer(u32 type, u32 size) - : m_buffer(GenBuffer()), m_buffertype(type), m_size(ROUND_UP_POW2(size)), - m_bit_per_slot(IntLog2(ROUND_UP_POW2(size) / SYNC_POINTS)) + : m_buffer(GenBuffer()), m_buffertype(type), m_size(MathUtil::NextPowerOf2(size)), + m_bit_per_slot(IntLog2(MathUtil::NextPowerOf2(size) / SYNC_POINTS)) { m_iterator = 0; m_used_iterator = 0; -- cgit v1.2.3