const correctness stuff

This commit is contained in:
2026-03-11 13:32:25 -04:00
parent 06c2ca306a
commit d26c7ee348
31 changed files with 55 additions and 24 deletions

View File

@ -27,7 +27,7 @@ vec2& vec2::operator=(const vec2 &rhs)
return *this;
}
bool vec2::operator==(vec2 rhs)
bool vec2::operator==(const vec2 rhs) const
{
bool ret = 1;
ret = ret & (rhs.x == x);
@ -236,7 +236,7 @@ mat2& mat2::operator=(const mat2 rhs)
return *this;
}
bool mat2::operator==(const mat2 rhs)
bool mat2::operator==(const mat2 rhs) const
{
bool ret = 1;
int I;

View File

@ -26,7 +26,7 @@ vec2f& vec2f::operator=(const vec2f &rhs)
return *this;
}
bool vec2f::operator==(vec2f rhs)
bool vec2f::operator==(const vec2f rhs) const
{
bool ret = 1;
ret = ret & (rhs.x == x);
@ -233,7 +233,7 @@ mat2f& mat2f::operator=(const mat2f rhs)
return *this;
}
bool mat2f::operator==(const mat2f rhs)
bool mat2f::operator==(const mat2f rhs) const
{
bool ret = 1;
int I;

View File

@ -35,7 +35,7 @@ vec3& vec3::operator=(const vec3 &rhs)
return *this;
}
bool vec3::operator==(vec3 rhs)
bool vec3::operator==(const vec3 rhs) const
{
return ((this->x == rhs.x) && (this->y == rhs.y) && (this->z == rhs.z));
}
@ -266,7 +266,7 @@ mat3& mat3::operator=(const mat3 rhs)
return *this;
}
bool mat3::operator==(const mat3 rhs)
bool mat3::operator==(const mat3 rhs) const
{
bool ret = 1;
int I;

View File

@ -35,7 +35,7 @@ vec3f& vec3f::operator=(const vec3f &rhs)
return *this;
}
bool vec3f::operator==(vec3f rhs)
bool vec3f::operator==(const vec3f rhs) const
{
return ((this->x == rhs.x) && (this->y == rhs.y) && (this->z == rhs.z));
}
@ -266,7 +266,7 @@ mat3f& mat3f::operator=(const mat3f rhs)
return *this;
}
bool mat3f::operator==(const mat3f rhs)
bool mat3f::operator==(const mat3f rhs) const
{
bool ret = 1;
int I;

View File

@ -41,7 +41,7 @@ vec4& vec4::operator=(const vec4 &rhs)
return *this;
}
bool vec4::operator==(vec4 rhs)
bool vec4::operator==(const vec4 rhs) const
{
return ((this->x == rhs.x) && (this->y == rhs.y) && (this->z == rhs.z) && (this->w == rhs.w));
}
@ -268,7 +268,7 @@ mat4& mat4::operator=(const mat4 rhs)
return *this;
}
bool mat4::operator==(const mat4 rhs)
bool mat4::operator==(const mat4 rhs) const
{
bool ret = 1;
int I;

View File

@ -41,7 +41,7 @@ vec4f& vec4f::operator=(const vec4f &rhs)
return *this;
}
bool vec4f::operator==(vec4f rhs)
bool vec4f::operator==(const vec4f rhs) const
{
return ((this->x == rhs.x) && (this->y == rhs.y) && (this->z == rhs.z) && (this->w == rhs.w));
}
@ -268,7 +268,7 @@ mat4f& mat4f::operator=(const mat4f rhs)
return *this;
}
bool mat4f::operator==(const mat4f rhs)
bool mat4f::operator==(const mat4f rhs) const
{
bool ret = 1;
int I;