Browse Source

Rename Vector4.components -> coords.

The use of .components is deprecated.
Lukas Tenbrink 10 months ago
parent
commit
23c9d41d2a
1 changed files with 4 additions and 3 deletions
  1. 4 3
      include/godot_cpp/variant/vector4.hpp

+ 4 - 3
include/godot_cpp/variant/vector4.hpp

@@ -55,16 +55,17 @@ struct _NO_DISCARD_ Vector4 {
 			real_t z;
 			real_t z;
 			real_t w;
 			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) {
 	_FORCE_INLINE_ real_t &operator[](const int p_axis) {
 		DEV_ASSERT((unsigned int)p_axis < 4);
 		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 {
 	_FORCE_INLINE_ const real_t &operator[](const int p_axis) const {
 		DEV_ASSERT((unsigned int)p_axis < 4);
 		DEV_ASSERT((unsigned int)p_axis < 4);
-		return components[p_axis];
+		return coord[p_axis];
 	}
 	}
 
 
 	Vector4::Axis min_axis_index() const;
 	Vector4::Axis min_axis_index() const;