fix: optimization: PVS-Studio warning V813

Passing large objects by const reference avoids unnecessary copying and enhances efficiency.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
Vyacheslav Ivanov 2024-08-02 05:33:32 +03:00 • committed by Pugemon
parent 5b325ac2bc
commit 2c1103307f
No known key found for this signature in database
GPG key ID: 472FA343B3CC3287
42 changed files with 173 additions and 144 deletions

View file

@ -70,7 +70,7 @@ struct AABB {
b = end;
}
inline void addPoint(glm::vec3 p) {
inline void addPoint(const glm::vec3& p) {
a = glm::min(a, p);
b = glm::max(b, p);
}