mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
gl_engine: fix a compiler warning.
../src/renderer/gl_engine/tvgGlRenderPass.cpp:37:29: warning: macro expands to multiple statements [-Wmultistatement-macros] 37 | if (mColorTex) GL_CHECK(glDeleteTextures(1, &mColorTex));
This commit is contained in:
parent
6a2b34df73
commit
3ef740145f
1 changed files with 2 additions and 3 deletions
|
@ -29,12 +29,11 @@ GlRenderTarget::GlRenderTarget(uint32_t width, uint32_t height): mWidth(width),
|
|||
GlRenderTarget::~GlRenderTarget()
|
||||
{
|
||||
if (mFbo == 0) return;
|
||||
|
||||
GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, 0));
|
||||
|
||||
GL_CHECK(glDeleteFramebuffers(1, &mFbo));
|
||||
|
||||
if (mColorTex) GL_CHECK(glDeleteTextures(1, &mColorTex));
|
||||
if (mColorTex == 0) return;
|
||||
GL_CHECK(glDeleteTextures(1, &mColorTex));
|
||||
}
|
||||
|
||||
void GlRenderTarget::init(GLint resolveId)
|
||||
|
|
Loading…
Add table
Reference in a new issue