mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Fix -Wsign-compare warnings.
I decided to modify code in a defensive way. Ideally functions like size() or length() should return an unsigned type.
This commit is contained in:
parent
ce114e35dd
commit
e5f665c718
21 changed files with 40 additions and 41 deletions
|
|
@ -449,7 +449,7 @@ static String variant_type_to_managed_name(const String &p_var_type_name) {
|
|||
Variant::_RID
|
||||
};
|
||||
|
||||
for (int i = 0; i < sizeof(var_types) / sizeof(Variant::Type); i++) {
|
||||
for (unsigned int i = 0; i < sizeof(var_types) / sizeof(Variant::Type); i++) {
|
||||
if (p_var_type_name == Variant::get_type_name(var_types[i]))
|
||||
return p_var_type_name;
|
||||
}
|
||||
|
|
@ -2172,7 +2172,7 @@ bool CSharpScript::_get_member_export(GDMonoClass *p_class, IMonoClassMember *p_
|
|||
return false;
|
||||
}
|
||||
|
||||
if (val != i) {
|
||||
if (val != (unsigned int)i) {
|
||||
uses_default_values = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue