From 504a7f00b69da06fed8c9c521ffa5fbfda75960a Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 1 Nov 2018 12:51:22 +0200 Subject: [PATCH] - fixed two potentially dangerous compilation warnings src/hwrenderer/dynlights/hw_lightbuffer.h:51:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] src/hwrenderer/scene/hw_renderstate.h:196:44: warning: operation on '((FRenderState*)this)->FRenderState::mVertexOffsets[0]' may be undefined [-Wsequence-point] --- src/hwrenderer/dynlights/hw_lightbuffer.h | 2 +- src/hwrenderer/scene/hw_renderstate.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hwrenderer/dynlights/hw_lightbuffer.h b/src/hwrenderer/dynlights/hw_lightbuffer.h index 8b3e182cb..9522ccc45 100644 --- a/src/hwrenderer/dynlights/hw_lightbuffer.h +++ b/src/hwrenderer/dynlights/hw_lightbuffer.h @@ -46,7 +46,7 @@ public: } // Only relevant for OpenGL, so this does not need access to the render state. - int BindUBO(unsigned int index) + int BindUBO(int index) { if (!mBufferType && index > -1) { diff --git a/src/hwrenderer/scene/hw_renderstate.h b/src/hwrenderer/scene/hw_renderstate.h index 99bded7e2..22cabc4c6 100644 --- a/src/hwrenderer/scene/hw_renderstate.h +++ b/src/hwrenderer/scene/hw_renderstate.h @@ -193,7 +193,7 @@ public: mBias.Reset(); mVertexBuffer = nullptr; - mVertexOffsets[0] = mVertexOffsets[0] = 0; + mVertexOffsets[0] = mVertexOffsets[1] = 0; mIndexBuffer = nullptr; mColor.Set(1.0f, 1.0f, 1.0f, 1.0f);