Make color getters const.

This commit is contained in:
hispidence 2021-07-24 12:26:48 +01:00
parent 9b31649ada
commit 3060fb85c0
2 changed files with 8 additions and 8 deletions

View file

@ -77,7 +77,7 @@ GameScriptColor::operator Vector4() const
return Vector4{ float(r), float(g), float(b), float(a) };
}
byte GameScriptColor::GetR()
byte GameScriptColor::GetR() const
{
return r;
}
@ -87,7 +87,7 @@ void GameScriptColor::SetR(byte v)
r = std::clamp<byte>(v, 0, 255);
}
byte GameScriptColor::GetG()
byte GameScriptColor::GetG() const
{
return g;
}
@ -97,7 +97,7 @@ void GameScriptColor::SetG(byte v)
g = std::clamp<byte>(v, 0, 255);
}
byte GameScriptColor::GetB()
byte GameScriptColor::GetB() const
{
return b;
}
@ -107,7 +107,7 @@ void GameScriptColor::SetB(byte v)
b = std::clamp<byte>(v, 0, 255);
}
byte GameScriptColor::GetA()
byte GameScriptColor::GetA() const
{
return a;
}

View file

@ -22,13 +22,13 @@ public:
operator Vector3() const;
operator Vector4() const;
byte GetR();
byte GetR() const;
void SetR(byte v);
byte GetG();
byte GetG() const;
void SetG(byte v);
byte GetB();
byte GetB() const;
void SetB(byte v);
byte GetA();
byte GetA() const;
void SetA(byte v);
std::string ToString() const;