diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-07-08 08:16:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-08 08:16:50 +0200 |
commit | af801820169865498f074ea9f155e680fc6db027 (patch) | |
tree | 552484a6f3a9336c344bcae53428c54345c0035b /drivers/gles3 | |
parent | 17e9030e485e0b9147fa573d45ab71f606b3442b (diff) | |
parent | 9a77d748c0d4e1c3dceb40216b9a345073032361 (diff) |
Merge pull request #30407 from qarmin/small_fixess
Fixes minor issues found by static analyzer
Diffstat (limited to 'drivers/gles3')
-rw-r--r-- | drivers/gles3/rasterizer_storage_gles3.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 7efe6a987a..c4cfd1e765 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -2526,19 +2526,19 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy int v = value; GLuint *gui = (GLuint *)data; - gui[0] = v & 1 ? GL_TRUE : GL_FALSE; - gui[1] = v & 2 ? GL_TRUE : GL_FALSE; - gui[2] = v & 4 ? GL_TRUE : GL_FALSE; + gui[0] = (v & 1) ? GL_TRUE : GL_FALSE; + gui[1] = (v & 2) ? GL_TRUE : GL_FALSE; + gui[2] = (v & 4) ? GL_TRUE : GL_FALSE; } break; case ShaderLanguage::TYPE_BVEC4: { int v = value; GLuint *gui = (GLuint *)data; - gui[0] = v & 1 ? GL_TRUE : GL_FALSE; - gui[1] = v & 2 ? GL_TRUE : GL_FALSE; - gui[2] = v & 4 ? GL_TRUE : GL_FALSE; - gui[3] = v & 8 ? GL_TRUE : GL_FALSE; + gui[0] = (v & 1) ? GL_TRUE : GL_FALSE; + gui[1] = (v & 2) ? GL_TRUE : GL_FALSE; + gui[2] = (v & 4) ? GL_TRUE : GL_FALSE; + gui[3] = (v & 8) ? GL_TRUE : GL_FALSE; } break; case ShaderLanguage::TYPE_INT: { @@ -3441,7 +3441,7 @@ void RasterizerStorageGLES3::mesh_add_surface(RID p_mesh, uint32_t p_format, VS: glGenBuffers(1, &surface->vertex_id); glBindBuffer(GL_ARRAY_BUFFER, surface->vertex_id); - glBufferData(GL_ARRAY_BUFFER, array_size, vr.ptr(), p_format & VS::ARRAY_FLAG_USE_DYNAMIC_UPDATE ? GL_DYNAMIC_DRAW : GL_STATIC_DRAW); + glBufferData(GL_ARRAY_BUFFER, array_size, vr.ptr(), (p_format & VS::ARRAY_FLAG_USE_DYNAMIC_UPDATE) ? GL_DYNAMIC_DRAW : GL_STATIC_DRAW); glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind if (p_format & VS::ARRAY_FORMAT_INDEX) { |