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
+2 -6
View File
@@ -8,11 +8,7 @@ inline constexpr glm::vec3 X(1, 0, 0);
inline constexpr glm::vec3 Y(0, 1, 0);
inline constexpr glm::vec3 Z(0, 0, 1);
void Mesh::addPlane(
const glm::vec3 &pos,
const glm::vec3 &right,
const glm::vec3 &up,
const glm::vec3 &norm) {
void Mesh::addPlane(glm::vec3 pos, glm::vec3 right, glm::vec3 up, glm::vec3 norm) {
vertices.push_back({pos-right-up, {0,0}, norm});
vertices.push_back({pos+right-up, {1,0}, norm});
vertices.push_back({pos+right+up, {1,1}, norm});
@@ -22,7 +18,7 @@ void Mesh::addPlane(
vertices.push_back({pos-right+up, {0,1}, norm});
}
void Mesh::addBox(const glm::vec3 &pos, const glm::vec3 &size) {
void Mesh::addBox(glm::vec3 pos, glm::vec3 size) {
addPlane(pos+Z*size, X*size, Y*size, Z);
addPlane(pos-Z*size, -X*size, Y*size, -Z);