fix: util_functions now uses utils namespace

stripped
Sara 2024-05-31 21:25:34 +02:00
parent c42cab169e
commit 1672dbd5f8
1 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@
#include <godot_cpp/variant/dictionary.hpp> #include <godot_cpp/variant/dictionary.hpp>
#include <godot_cpp/templates/hash_map.hpp> #include <godot_cpp/templates/hash_map.hpp>
namespace utils {
template<typename T, typename U> template<typename T, typename U>
godot::Dictionary hashmap_to_dictionary(godot::HashMap<T, U> const &map) { godot::Dictionary hashmap_to_dictionary(godot::HashMap<T, U> const &map) {
godot::Dictionary dict{}; godot::Dictionary dict{};
@ -20,5 +21,6 @@ godot::HashMap<T, U> dictionary_to_hashmap(godot::Dictionary const &dict) {
map.insert(keys[i], dict[keys[i]]); map.insert(keys[i], dict[keys[i]]);
return map; return map;
} }
}
#endif // !UTILS_FUNCTIONS_HPP #endif // !UTILS_FUNCTIONS_HPP