Merge 0948a33396
into 9407651316
This commit is contained in:
commit
7a143f830b
|
@ -62,6 +62,9 @@ struct Vector2 {
|
|||
/// Copy-constructor
|
||||
Vector2(const Vector2& vector);
|
||||
|
||||
/// Move-constructor
|
||||
Vector2(Vector2&& vector) noexcept;
|
||||
|
||||
/// Destructor
|
||||
~Vector2() = default;
|
||||
|
||||
|
@ -131,6 +134,9 @@ struct Vector2 {
|
|||
/// Overloaded operator
|
||||
Vector2& operator=(const Vector2& vector);
|
||||
|
||||
/// Overloaded move-assignment operator
|
||||
Vector2& operator=(Vector2&& vector) noexcept;
|
||||
|
||||
/// Overloaded less than operator for ordering to be used inside std::set for instance
|
||||
bool operator<(const Vector2& vector) const;
|
||||
|
||||
|
@ -173,6 +179,8 @@ inline Vector2::Vector2(const Vector2& vector) : x(vector.x), y(vector.y) {
|
|||
|
||||
}
|
||||
|
||||
/// Move-constructor
|
||||
inline Vector2::Vector2(Vector2&& vector) noexcept = default;
|
||||
|
||||
// Set the vector to zero
|
||||
inline void Vector2::setToZero() {
|
||||
|
@ -337,6 +345,9 @@ inline Vector2& Vector2::operator=(const Vector2& vector) {
|
|||
return *this;
|
||||
}
|
||||
|
||||
/// Move-assignment operator
|
||||
inline Vector2& Vector2::operator=(Vector2&& vector) noexcept = default;
|
||||
|
||||
// Overloaded less than operator for ordering to be used inside std::set for instance
|
||||
inline bool Vector2::operator<(const Vector2& vector) const {
|
||||
return (x == vector.x ? y < vector.y : x < vector.x);
|
||||
|
|
|
@ -65,6 +65,9 @@ struct Vector3 {
|
|||
/// Copy-constructor
|
||||
Vector3(const Vector3& vector);
|
||||
|
||||
/// Move-constructor
|
||||
Vector3(Vector3&& vector) noexcept;
|
||||
|
||||
/// Destructor
|
||||
~Vector3() = default;
|
||||
|
||||
|
@ -143,6 +146,9 @@ struct Vector3 {
|
|||
/// Overloaded operator
|
||||
Vector3& operator=(const Vector3& vector);
|
||||
|
||||
/// Overloaded move-assignment operator
|
||||
Vector3& operator=(Vector3&& vector) noexcept;
|
||||
|
||||
/// Overloaded less than operator for ordering to be used inside std::set for instance
|
||||
bool operator<(const Vector3& vector) const;
|
||||
|
||||
|
@ -185,6 +191,9 @@ inline Vector3::Vector3(const Vector3& vector) : x(vector.x), y(vector.y), z(vec
|
|||
|
||||
}
|
||||
|
||||
/// Move-constructor
|
||||
inline Vector3::Vector3(Vector3&& vector) noexcept = default;
|
||||
|
||||
// Set the vector to zero
|
||||
inline void Vector3::setToZero() {
|
||||
x = 0;
|
||||
|
@ -364,6 +373,9 @@ inline Vector3& Vector3::operator=(const Vector3& vector) {
|
|||
return *this;
|
||||
}
|
||||
|
||||
// Move-assignment operator
|
||||
inline Vector3& Vector3::operator=(Vector3&& vector) noexcept = default;
|
||||
|
||||
// Overloaded less than operator for ordering to be used inside std::set for instance
|
||||
inline bool Vector3::operator<(const Vector3& vector) const {
|
||||
return (x == vector.x ? (y == vector.y ? z < vector.z : y < vector.y) : x < vector.x);
|
||||
|
|
Loading…
Reference in New Issue
Block a user