summaryrefslogtreecommitdiffstats
path: root/include/godot_cpp/core/Variant.cpp
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2024-08-20 14:53:22 +0200
committerRaul Santos <raulsntos@gmail.com>2024-08-20 14:53:22 +0200
commit48291990817fbaa8cc2d0307a16d7345bf62da52 (patch)
tree1f88a185dd8dce681d2f4abd44bf6bd1ee2cdbb7 /include/godot_cpp/core/Variant.cpp
parentfbbf9ec4efd8f1055d00edb8d926eef8ba4c2cce (diff)
downloadredot-cpp-48291990817fbaa8cc2d0307a16d7345bf62da52.tar.gz
Avoid hardcoded type conversion for metadata
The engine uses the names `int` and `float` to refer to the 64-bit types, so in the bindings generator we have a hardcoded conversion for those types. But this type conversion should not be used for metadata. Even though the underlying type should still be 64-bit for interop, metadata is meant to specify the correct type to expose. So if metadata says `float` it means the type is really meant to be a 32-bit `float` and not `double`. Other hardcoded type conversions (`int` and `Nil`) won't ever be metadata. This change corrects the `float` type, to use the right type in the generated C++ code. Before we were always using `double` due to this type conversion.
Diffstat (limited to 'include/godot_cpp/core/Variant.cpp')
0 files changed, 0 insertions, 0 deletions