Skip to content

Commit

Permalink
Merge pull request #1478 from richardhozak/fix-warnings
Browse files Browse the repository at this point in the history
Fix warnings emitted with -Wall
  • Loading branch information
dsnopek authored Jun 12, 2024
2 parents fe06472 + 8c6cc1e commit 7d4758e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/core/class_db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7d4758e

Please sign in to comment.