From 858162e0c10416c9d23eeac928c125471bd63e0f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 17 Mar 2020 19:03:58 -0400 Subject: [PATCH] CLineRenderer: Remove unnecessary casts to bool These constructs function identically without the need for casting. --- Runtime/Graphics/CLineRenderer.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Runtime/Graphics/CLineRenderer.cpp b/Runtime/Graphics/CLineRenderer.cpp index 517f72a2a..d8b4b3472 100644 --- a/Runtime/Graphics/CLineRenderer.cpp +++ b/Runtime/Graphics/CLineRenderer.cpp @@ -40,10 +40,11 @@ CLineRenderer::CLineRenderer(boo::IGraphicsDataFactory::Context& ctx, EPrimitive break; } - if (bool(texture)) + if (texture) { m_vertBufTex = s_vertPoolTex.allocateBlock(CGraphics::g_BooFactory, maxTriVerts); - else + } else { m_vertBufNoTex = s_vertPoolNoTex.allocateBlock(CGraphics::g_BooFactory, maxTriVerts); + } m_uniformBuf = s_uniformPool.allocateBlock(CGraphics::g_BooFactory); @@ -70,10 +71,11 @@ CLineRenderer::CLineRenderer(EPrimitiveMode mode, u32 maxVerts, const boo::ObjTo break; } - if (bool(texture)) + if (texture) { m_vertBufTex = s_vertPoolTex.allocateBlock(CGraphics::g_BooFactory, maxTriVerts); - else + } else { m_vertBufNoTex = s_vertPoolNoTex.allocateBlock(CGraphics::g_BooFactory, maxTriVerts); + } m_uniformBuf = s_uniformPool.allocateBlock(CGraphics::g_BooFactory);