mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-16 10:04:42 +03:00
feat(gx): add equality operator to CGxStateBom
This commit is contained in:
parent
317d94cd1a
commit
36fa30eba8
@ -33,20 +33,42 @@ const CGxStateBom& CGxStateBom::operator=(C3Vector& value) {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGxStateBom::operator!=(int32_t value) {
|
bool CGxStateBom::operator==(float value) {
|
||||||
return this->m_data.i[0] != value;
|
return this->m_data.f[0] == value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGxStateBom::operator!=(uint32_t value) {
|
bool CGxStateBom::operator==(int32_t value) {
|
||||||
return this->m_data.i[0] != value;
|
return this->m_data.i[0] == value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CGxStateBom::operator==(uint32_t value) {
|
||||||
|
return this->m_data.u[0] == value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CGxStateBom::operator==(void* value) {
|
||||||
|
return this->m_data.p == value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CGxStateBom::operator==(C3Vector& value) {
|
||||||
|
return this->m_data.f[0] == value.x
|
||||||
|
|| this->m_data.f[1] == value.y
|
||||||
|
|| this->m_data.f[2] == value.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGxStateBom::operator!=(float value) {
|
bool CGxStateBom::operator!=(float value) {
|
||||||
return this->m_data.f[0] != value;
|
return !(*this == value);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CGxStateBom::operator!=(int32_t value) {
|
||||||
|
return !(*this == value);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CGxStateBom::operator!=(uint32_t value) {
|
||||||
|
return !(*this == value);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGxStateBom::operator!=(void* value) {
|
bool CGxStateBom::operator!=(void* value) {
|
||||||
return this->m_data.p != value;
|
return !(*this == value);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CGxStateBom::operator!=(C3Vector& value) {
|
bool CGxStateBom::operator!=(C3Vector& value) {
|
||||||
|
@ -11,6 +11,7 @@ class CGxStateBom {
|
|||||||
// Member variables
|
// Member variables
|
||||||
union {
|
union {
|
||||||
int32_t i[3];
|
int32_t i[3];
|
||||||
|
uint32_t u[3];
|
||||||
float f[3];
|
float f[3];
|
||||||
void* p;
|
void* p;
|
||||||
} m_data;
|
} m_data;
|
||||||
@ -23,6 +24,11 @@ class CGxStateBom {
|
|||||||
const CGxStateBom& operator=(uint32_t);
|
const CGxStateBom& operator=(uint32_t);
|
||||||
const CGxStateBom& operator=(void*);
|
const CGxStateBom& operator=(void*);
|
||||||
const CGxStateBom& operator=(C3Vector&);
|
const CGxStateBom& operator=(C3Vector&);
|
||||||
|
bool operator==(float);
|
||||||
|
bool operator==(int32_t);
|
||||||
|
bool operator==(uint32_t);
|
||||||
|
bool operator==(void*);
|
||||||
|
bool operator==(C3Vector&);
|
||||||
bool operator!=(float);
|
bool operator!=(float);
|
||||||
bool operator!=(int32_t);
|
bool operator!=(int32_t);
|
||||||
bool operator!=(uint32_t);
|
bool operator!=(uint32_t);
|
||||||
|
Loading…
Reference in New Issue
Block a user