Fix warnings emitted with -Wall

pull/1478/head
Richard Hozák 2024-06-02 21:47:51 +02:00
parent 21d526e5e5
commit 8c6cc1ec15
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) { if (mi.argument_count > 0) {
mi.arguments = (GDExtensionPropertyInfo *)memalloc(sizeof(GDExtensionPropertyInfo) * mi.argument_count); mi.arguments = (GDExtensionPropertyInfo *)memalloc(sizeof(GDExtensionPropertyInfo) * mi.argument_count);
mi.arguments_metadata = (GDExtensionClassMethodArgumentMetadata *)memalloc(sizeof(GDExtensionClassMethodArgumentMetadata) * 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[i] = p_method.arguments[i]._to_gdextension();
mi.arguments_metadata[i] = p_method.arguments_metadata[i]; 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); std::lock_guard<std::mutex> lock(engine_singletons_mutex);
singleton_objects.reserve(engine_singletons.size()); 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); singleton_objects.push_back(pair.second);
} }
} }

View File

@ -75,7 +75,7 @@ MethodInfo::operator Dictionary() const {
dict["name"] = name; dict["name"] = name;
dict["args"] = internal::convert_property_list(arguments); dict["args"] = internal::convert_property_list(arguments);
Array da; 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]); da.push_back(default_arguments[i]);
} }
dict["default_args"] = da; dict["default_args"] = da;