GLES2: Fix VersionKey comparison in `ShaderGLES2::bind()`

This was comparing arrays, GCC 12 raises a warning for it:

```
drivers/gles2/shader_gles2.cpp: In member function 'bool ShaderGLES2::bind()':
drivers/gles2/shader_gles2.cpp:80:71: error: comparison between two arrays [-Werror=array-compare]
   80 |         if (active != this || !version || new_conditional_version.key != conditional_version.key) {
      |                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gles2/shader_gles2.cpp:80:71: note: use unary '+' which decays operands to pointers or '&'component_ref' not supported by dump_decl<declaration error>[0] != &'component_ref' not supported by dump_decl<declaration error>[0]' to compare the addresses
```
This commit is contained in:
Rémi Verschelde 2022-03-07 09:30:18 +01:00
parent b28eea610c
commit 76df26b110
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ GLint ShaderGLES2::get_uniform_location(int p_index) const {
} }
bool ShaderGLES2::bind() { bool ShaderGLES2::bind() {
if (active != this || !version || new_conditional_version.key != conditional_version.key) { if (active != this || !version || !(new_conditional_version == conditional_version)) {
conditional_version = new_conditional_version; conditional_version = new_conditional_version;
version = get_current_version(); version = get_current_version();
} else { } else {