From 23c9d41d2a56095efaa9169f9619d4dd6ade30e1 Mon Sep 17 00:00:00 2001 From: Lukas Tenbrink Date: Thu, 26 Sep 2024 15:04:06 +0200 Subject: [PATCH] Rename Vector4.components -> coords. The use of .components is deprecated. --- include/godot_cpp/variant/vector4.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/godot_cpp/variant/vector4.hpp b/include/godot_cpp/variant/vector4.hpp index 866e522b..e0e197f8 100644 --- a/include/godot_cpp/variant/vector4.hpp +++ b/include/godot_cpp/variant/vector4.hpp @@ -55,16 +55,17 @@ struct _NO_DISCARD_ Vector4 { real_t z; real_t w; }; - real_t components[4] = { 0, 0, 0, 0 }; + [[deprecated("Use coord instead")]] real_t components[4]; + real_t coord[4] = { 0, 0, 0, 0 }; }; _FORCE_INLINE_ real_t &operator[](const int p_axis) { DEV_ASSERT((unsigned int)p_axis < 4); - return components[p_axis]; + return coord[p_axis]; } _FORCE_INLINE_ const real_t &operator[](const int p_axis) const { DEV_ASSERT((unsigned int)p_axis < 4); - return components[p_axis]; + return coord[p_axis]; } Vector4::Axis min_axis_index() const;