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

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