diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-12-01 10:36:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-01 10:36:59 +0100 |
commit | 17137b2e2ecdeb5638a885d28498164d35a2130d (patch) | |
tree | 564514ff80363fb572c642f1d0d03fe55dcf0fe9 | |
parent | 54136ee8357c5140a3775c54f08db5f7deda2058 (diff) | |
parent | cad5be53b1dd81416d644ef5002c85951f07adcc (diff) | |
download | redot-cpp-17137b2e2ecdeb5638a885d28498164d35a2130d.tar.gz |
Merge pull request #1323 from dsnopek/gcc-type-limits-error
Prevent `-Wtype-limits` warning on GCC 11 due to unsigned comparison
-rw-r--r-- | src/godot.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/godot.cpp b/src/godot.cpp index ee4156b..5c2aaa6 100644 --- a/src/godot.cpp +++ b/src/godot.cpp @@ -271,7 +271,12 @@ GDExtensionBool GDExtensionBinding::init(GDExtensionInterfaceGetProcAddress p_ge } else if (internal::godot_version.minor != GODOT_VERSION_MINOR) { compatible = internal::godot_version.minor > GODOT_VERSION_MINOR; } else { +#if GODOT_VERSION_PATCH > 0 compatible = internal::godot_version.patch >= GODOT_VERSION_PATCH; +#else + // Prevent -Wtype-limits warning due to unsigned comparison. + compatible = true; +#endif } if (!compatible) { // We need to use snprintf() here because vformat() uses Variant, and we haven't loaded |