mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
utilities: Add constexpr to color4_base
For consistency with the others colorX_base
This commit is contained in:
parent
65581acbf9
commit
497f0c26e7
1 changed files with 5 additions and 5 deletions
|
@ -841,7 +841,7 @@ struct color4_base
|
||||||
T xyzw[4];
|
T xyzw[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
color4_base()
|
constexpr color4_base()
|
||||||
: x{}
|
: x{}
|
||||||
, y{}
|
, y{}
|
||||||
, z{}
|
, z{}
|
||||||
|
@ -849,7 +849,7 @@ struct color4_base
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
color4_base(T x, T y = {}, T z = {}, T w = {})
|
constexpr color4_base(T x, T y = {}, T z = {}, T w = {})
|
||||||
: x(x)
|
: x(x)
|
||||||
, y(y)
|
, y(y)
|
||||||
, z(z)
|
, z(z)
|
||||||
|
@ -857,18 +857,18 @@ struct color4_base
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator == (const color4_base& rhs) const
|
constexpr bool operator == (const color4_base& rhs) const
|
||||||
{
|
{
|
||||||
return r == rhs.r && g == rhs.g && b == rhs.b && a == rhs.a;
|
return r == rhs.r && g == rhs.g && b == rhs.b && a == rhs.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator != (const color4_base& rhs) const
|
constexpr bool operator != (const color4_base& rhs) const
|
||||||
{
|
{
|
||||||
return !(*this == rhs);
|
return !(*this == rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename NT>
|
template<typename NT>
|
||||||
operator color4_base<NT>() const
|
constexpr operator color4_base<NT>() const
|
||||||
{
|
{
|
||||||
return{ (NT)x, (NT)y, (NT)z, (NT)w };
|
return{ (NT)x, (NT)y, (NT)z, (NT)w };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue