From b82b0a5f247eba5d73d913dbd01a88cde2132368 Mon Sep 17 00:00:00 2001 From: Mark Nefedov Date: Fri, 8 May 2020 18:31:56 +0300 Subject: The 'Key.Hash' variable was assigned the same value. ``` if (Key.Hash == 0){ Key.Hash = 0; } ``` --- Graphics/GraphicsEngineOpenGL/src/FBOCache.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/src/FBOCache.cpp b/Graphics/GraphicsEngineOpenGL/src/FBOCache.cpp index 5d18a955..5fe2af2c 100644 --- a/Graphics/GraphicsEngineOpenGL/src/FBOCache.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/FBOCache.cpp @@ -67,7 +67,6 @@ std::size_t FBOCache::FBOCacheKeyHashFunc::operator()(const FBOCacheKey& Key) co if (Key.Hash == 0) { std::hash TexViewDescHasher; - Key.Hash = 0; HashCombine(Key.Hash, Key.NumRenderTargets); for (Uint32 rt = 0; rt < Key.NumRenderTargets; ++rt) { -- cgit v1.2.3 From fccc34906dc98def103046b2fd659710958f5eaa Mon Sep 17 00:00:00 2001 From: Mark Nefedov Date: Fri, 8 May 2020 18:34:03 +0300 Subject: Possible overflow. Consider casting operands, not the result. --- Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp b/Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp index cecadcba..8838b968 100644 --- a/Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp @@ -190,7 +190,7 @@ const GLObjectWrappers::GLVertexArrayObj& VAOCache::GetVAO(IPipelineState* constexpr bool ResetVAO = false; GLState.BindBuffer(GL_ARRAY_BUFFER, pBufferOGL->m_GlBuffer, ResetVAO); - GLvoid* DataStartOffset = reinterpret_cast(static_cast(CurrStream.Offset + LayoutIt->RelativeOffset)); + GLvoid* DataStartOffset = reinterpret_cast(static_cast(CurrStream.Offset) + static_cast(LayoutIt->RelativeOffset)); auto GlType = TypeToGLType(LayoutIt->ValueType); if (!LayoutIt->IsNormalized && (LayoutIt->ValueType == VT_INT8 || -- cgit v1.2.3 From 2b3eb759e13316e195ff867bcc1b50ec7f3e4c40 Mon Sep 17 00:00:00 2001 From: Mark Nefedov Date: Fri, 8 May 2020 23:30:39 +0300 Subject: Update FBOCache.cpp Reverting change. --- Graphics/GraphicsEngineOpenGL/src/FBOCache.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/src/FBOCache.cpp b/Graphics/GraphicsEngineOpenGL/src/FBOCache.cpp index 5fe2af2c..5d18a955 100644 --- a/Graphics/GraphicsEngineOpenGL/src/FBOCache.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/FBOCache.cpp @@ -67,6 +67,7 @@ std::size_t FBOCache::FBOCacheKeyHashFunc::operator()(const FBOCacheKey& Key) co if (Key.Hash == 0) { std::hash TexViewDescHasher; + Key.Hash = 0; HashCombine(Key.Hash, Key.NumRenderTargets); for (Uint32 rt = 0; rt < Key.NumRenderTargets; ++rt) { -- cgit v1.2.3