Merge pull request #1478 from richardhozak/fix-warnings

Fix warnings emitted with -Wall
pull/1485/head
David Snopek 2024-06-12 10:01:59 -05:00 committed by GitHub
commit 7d4758eace
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -353,7 +353,7 @@ void ClassDB::add_virtual_method(const StringName &p_class, const MethodInfo &p_
if (mi.argument_count > 0) {
mi.arguments = (GDExtensionPropertyInfo *)memalloc(sizeof(GDExtensionPropertyInfo) * mi.argument_count);
mi.arguments_metadata = (GDExtensionClassMethodArgumentMetadata *)memalloc(sizeof(GDExtensionClassMethodArgumentMetadata) * mi.argument_count);
for (int i = 0; i < mi.argument_count; i++) {
for (uint32_t i = 0; i < mi.argument_count; i++) {
mi.arguments[i] = p_method.arguments[i]._to_gdextension();
mi.arguments_metadata[i] = p_method.arguments_metadata[i];
}
@ -429,7 +429,7 @@ void ClassDB::deinitialize(GDExtensionInitializationLevel p_level) {
{
std::lock_guard<std::mutex> lock(engine_singletons_mutex);
singleton_objects.reserve(engine_singletons.size());
for (const std::pair<StringName, Object *> &pair : engine_singletons) {
for (const std::pair<const StringName, Object *> &pair : engine_singletons) {
singleton_objects.push_back(pair.second);
}
}

View File

@ -75,7 +75,7 @@ MethodInfo::operator Dictionary() const {
dict["name"] = name;
dict["args"] = internal::convert_property_list(arguments);
Array da;
for (int i = 0; i < default_arguments.size(); i++) {
for (size_t i = 0; i < default_arguments.size(); i++) {
da.push_back(default_arguments[i]);
}
dict["default_args"] = da;