fix: replaced uses of gd:: with godot::

main
Sara 2024-05-31 21:18:42 +02:00
parent 1e5f930576
commit c42cab169e
1 changed files with 6 additions and 6 deletions

View File

@ -5,17 +5,17 @@
#include <godot_cpp/templates/hash_map.hpp>
template<typename T, typename U>
gd::Dictionary hashmap_to_dictionary(gd::HashMap<T, U> const &map) {
gd::Dictionary dict{};
for(gd::KeyValue<T, U> const &kvp : map)
godot::Dictionary hashmap_to_dictionary(godot::HashMap<T, U> const &map) {
godot::Dictionary dict{};
for(godot::KeyValue<T, U> const &kvp : map)
dict[kvp.key] = kvp.value;
return dict;
}
template<typename T, typename U>
gd::HashMap<T, U> dictionary_to_hashmap(gd::Dictionary const &dict) {
gd::HashMap<T, U> map{};
gd::Array keys{dict.keys()};
godot::HashMap<T, U> dictionary_to_hashmap(godot::Dictionary const &dict) {
godot::HashMap<T, U> map{};
godot::Array keys{dict.keys()};
for(size_t i = 0; i < keys.size(); ++i)
map.insert(keys[i], dict[keys[i]]);
return map;