CLineRenderer: Remove unnecessary casts to bool

These constructs function identically without the need for casting.
This commit is contained in:
Lioncash 2020-03-17 19:03:58 -04:00
parent 6ddbd15cfc
commit 858162e0c1
1 changed files with 6 additions and 4 deletions

View File

@ -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);