mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-30 23:30:27 +02:00
Remove trivial copy constructors and operators
This commit is contained in:
@ -28,15 +28,11 @@ namespace core
|
||||
vector3d(T nx, T ny, T nz) : X(nx), Y(ny), Z(nz) {}
|
||||
//! Constructor with the same value for all elements
|
||||
explicit vector3d(T n) : X(n), Y(n), Z(n) {}
|
||||
//! Copy constructor
|
||||
vector3d(const vector3d<T>& other) : X(other.X), Y(other.Y), Z(other.Z) {}
|
||||
|
||||
// operators
|
||||
|
||||
vector3d<T> operator-() const { return vector3d<T>(-X, -Y, -Z); }
|
||||
|
||||
vector3d<T>& operator=(const vector3d<T>& other) { X = other.X; Y = other.Y; Z = other.Z; return *this; }
|
||||
|
||||
vector3d<T> operator+(const vector3d<T>& other) const { return vector3d<T>(X + other.X, Y + other.Y, Z + other.Z); }
|
||||
vector3d<T>& operator+=(const vector3d<T>& other) { X+=other.X; Y+=other.Y; Z+=other.Z; return *this; }
|
||||
vector3d<T> operator+(const T val) const { return vector3d<T>(X + val, Y + val, Z + val); }
|
||||
|
Reference in New Issue
Block a user