Skip to content

Commit

Permalink
Avoid error from -Werror=type-limits on GCC 11
Browse files Browse the repository at this point in the history
  • Loading branch information
dsnopek committed Nov 30, 2023
1 parent 54136ee commit cad5be5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/godot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cad5be5

Please sign in to comment.