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
```
(cherry picked from commit 76df26b110
)
This commit is contained in:
parent
5bd75bccae
commit
cb66b672d7
|
@ -77,7 +77,7 @@ GLint ShaderGLES2::get_uniform_location(int p_index) const {
|
|||
}
|
||||
|
||||
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;
|
||||
version = get_current_version();
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue