godotengine / godotengine/godot-cpp

TypedDictionary doesn't support Vector4(i)

Open
#1,967 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.7k
Forks
809
Avg merge
1d 3h
Merged PRs (30d)
8

Description

### Godot version

4.6.1-stable

### godot-cpp version

41cfbd1

### System information

Likely irrelevant: Windows 11 25H2 (26200.8117), Intel i7-11700F, 64GB RAM, NVIDIA RTX 3060 Ti

### Issue description

`TypedDictionary` does not support using `Vector4` and `Vector4i`:

```
\godot-cpp\include\godot_cpp/variant/typed_dictionary.hpp(243): error C2039: 'get_class_static': is not a member of 'godot::Vector4i'
\godot-cpp\include\godot_cpp/variant/vector4i.hpp(41): note: see declaration of 'godot::Vector4i'
\godot-cpp\include\godot_cpp/variant/typed_dictionary.hpp(243): note: the template instantiation context (the oldest one first) is
src\resources\anim_cfg_resource.cpp(179): note: see reference to class template instantiation 'godot::TypedDictionary' being compiled
\godot-cpp\include\godot_cpp/variant/typed_dictionary.hpp(243): note: while compiling class template member function 'godot::TypedDictionary::TypedDictionary(void)'
src\resources\anim_cfg_resource.cpp(196): note: see the first reference to 'godot::TypedDictionary::TypedDictionary' in 'godot::AnimConfigResource::get_animation_configs_dict'
\godot-cpp\include\godot_cpp/variant/typed_dictionary.hpp(243): error C3861: 'get_class_static': identifier not found
scons: *** [src\resources\anim_cfg_resource.windows.template_debug.x86_64.obj] Error 2
scons: building terminated because of errors.
```

Without digging too deep in the code, it seems to stem from [`typed_dictionary.hpp`](https://github.com/godotengine/godot-cpp/blob/41cfbd1d3bc078d41d2dae284d834df4c541b4b9/include/godot_cpp/variant/typed_dictionary.hpp) not including things like:

```
MAKE_TYPED_DICTIONARY_EXPANDED(m_type, m_variant_type, Vector4, Variant::VECTOR4)
MAKE_TYPED_DICTIONARY_EXPANDED(m_type, m_variant_type, Vector4i, Variant::VECTOR4I)
```

and

```
MAKE_TYPED_DICTIONARY(Vector4, Variant::VECTOR4)
MAKE_TYPED_DICTIONARY(Vector4i, Variant::VECTOR4I)
```

### Steps to reproduce

```
TypedDictionary
```

### Minimal reproduction project

This felt unnecessary, I'll happily provided upon request.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.