mirror of
https://github.com/glest/glest-source.git
synced 2025-08-09 01:46:28 +02:00
- more memory cleanup
This commit is contained in:
@@ -33,6 +33,7 @@ class Vec2{
|
||||
public:
|
||||
T x;
|
||||
T y;
|
||||
|
||||
public:
|
||||
Vec2(){
|
||||
};
|
||||
@@ -52,6 +53,11 @@ public:
|
||||
this->x= v.x;
|
||||
this->y= v.y;
|
||||
}
|
||||
template<typename S>
|
||||
explicit Vec2(Vec2<S> &v){
|
||||
this->x= v.x;
|
||||
this->y= v.y;
|
||||
}
|
||||
|
||||
Vec2(T x, T y){
|
||||
this->x= x;
|
||||
@@ -66,6 +72,12 @@ public:
|
||||
return reinterpret_cast<const T*>(this);
|
||||
}
|
||||
|
||||
Vec2<T> & operator=(const Vec2<T> &v) {
|
||||
this->x= v.x;
|
||||
this->y= v.y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator ==(const Vec2<T> &v) const{
|
||||
return x==v.x && y==v.y;
|
||||
}
|
||||
@@ -201,6 +213,13 @@ public:
|
||||
this->z= v.z;
|
||||
}
|
||||
|
||||
template<typename S>
|
||||
explicit Vec3(Vec3<S> &v){
|
||||
this->x= v.x;
|
||||
this->y= v.y;
|
||||
this->z= v.z;
|
||||
}
|
||||
|
||||
Vec3(T x, T y, T z){
|
||||
this->x= x;
|
||||
this->y= y;
|
||||
@@ -221,6 +240,13 @@ public:
|
||||
return reinterpret_cast<const T*>(this);
|
||||
}
|
||||
|
||||
Vec3<T> & operator=(const Vec3<T> &v) {
|
||||
this->x= v.x;
|
||||
this->y= v.y;
|
||||
this->z= v.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator ==(const Vec3<T> &v) const{
|
||||
return x==v.x && y==v.y && z==v.z;
|
||||
}
|
||||
@@ -387,6 +413,14 @@ public:
|
||||
this->w= v.w;
|
||||
}
|
||||
|
||||
template<typename S>
|
||||
explicit Vec4(Vec4<S> &v){
|
||||
this->x= v.x;
|
||||
this->y= v.y;
|
||||
this->z= v.z;
|
||||
this->w= v.w;
|
||||
}
|
||||
|
||||
Vec4(T x, T y, T z, T w){
|
||||
this->x= x;
|
||||
this->y= y;
|
||||
@@ -416,6 +450,14 @@ public:
|
||||
return reinterpret_cast<const T*>(this);
|
||||
}
|
||||
|
||||
Vec4<T> & operator=(const Vec4<T> &v) {
|
||||
this->x= v.x;
|
||||
this->y= v.y;
|
||||
this->z= v.z;
|
||||
this->w= v.w;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool operator ==(const Vec4<T> &v) const{
|
||||
return x==v.x && y==v.y && z==v.z && w==v.w;
|
||||
}
|
||||
|
Reference in New Issue
Block a user