Avoid error from -Werror=type-limits on GCC 11
(cherry picked from commit cad5be53b1
)
pull/1373/head
parent
b1bd58d7da
commit
e9273e8528
|
@ -264,7 +264,12 @@ GDExtensionBool GDExtensionBinding::init(GDExtensionInterfaceGetProcAddress p_ge
|
||||||
} else if (internal::godot_version.minor != GODOT_VERSION_MINOR) {
|
} else if (internal::godot_version.minor != GODOT_VERSION_MINOR) {
|
||||||
compatible = internal::godot_version.minor > GODOT_VERSION_MINOR;
|
compatible = internal::godot_version.minor > GODOT_VERSION_MINOR;
|
||||||
} else {
|
} else {
|
||||||
|
#if GODOT_VERSION_PATCH > 0
|
||||||
compatible = internal::godot_version.patch >= GODOT_VERSION_PATCH;
|
compatible = internal::godot_version.patch >= GODOT_VERSION_PATCH;
|
||||||
|
#else
|
||||||
|
// Prevent -Wtype-limits warning due to unsigned comparison.
|
||||||
|
compatible = true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (!compatible) {
|
if (!compatible) {
|
||||||
// We need to use snprintf() here because vformat() uses Variant, and we haven't loaded
|
// We need to use snprintf() here because vformat() uses Variant, and we haven't loaded
|
||||||
|
|
Loading…
Reference in New Issue