Revert "fix: optimization: Various PVS-Studio warnings"

This commit is contained in:
MihailRis
2024-08-02 14:51:44 +03:00
committed by GitHub
parent a7ef7bb365
commit ba046a52c0
90 changed files with 259 additions and 274 deletions
+10 -10
View File
@@ -51,7 +51,7 @@ void Batch3D::vertex(
buffer[index++] = a;
}
void Batch3D::vertex(
const glm::vec3& coord, float u, float v,
glm::vec3 coord, float u, float v,
float r, float g, float b, float a
) {
buffer[index++] = coord.x;
@@ -65,8 +65,8 @@ void Batch3D::vertex(
buffer[index++] = a;
}
void Batch3D::vertex(
const glm::vec3& point,
const glm::vec2& uvpoint,
glm::vec3 point,
glm::vec2 uvpoint,
float r, float g, float b, float a
) {
buffer[index++] = point.x;
@@ -118,12 +118,12 @@ void Batch3D::texture(Texture* new_texture){
}
void Batch3D::sprite(
const glm::vec3& pos,
const glm::vec3& up,
const glm::vec3& right,
glm::vec3 pos,
glm::vec3 up,
glm::vec3 right,
float w, float h,
const UVRegion& uv,
const glm::vec4& color
const UVRegion& uv,
glm::vec4 color
){
const float r = color.r;
const float g = color.g;
@@ -245,11 +245,11 @@ void Batch3D::blockCube(
cube((1.0f - size) * -0.5f, size, texfaces, tint, shading);
}
void Batch3D::point(const glm::vec3& coord, const glm::vec2& uv, const glm::vec4& tint) {
void Batch3D::point(glm::vec3 coord, glm::vec2 uv, glm::vec4 tint) {
vertex(coord, uv, tint.r, tint.g, tint.b, tint.a);
}
void Batch3D::point(const glm::vec3& coord, const glm::vec4& tint) {
void Batch3D::point(glm::vec3 coord, glm::vec4 tint) {
point(coord, glm::vec2(), tint);
}