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:
+5
-5
@@ -399,10 +399,10 @@ namespace audio {
|
||||
/// @param lookAt point the listener look at
|
||||
/// @param up camera up vector
|
||||
void set_listener(
|
||||
glm::vec3 position,
|
||||
glm::vec3 velocity,
|
||||
glm::vec3 lookAt,
|
||||
glm::vec3 up
|
||||
const glm::vec3& position,
|
||||
const glm::vec3& velocity,
|
||||
const glm::vec3& lookAt,
|
||||
const glm::vec3& up
|
||||
);
|
||||
|
||||
/// @brief Play 3D sound in the world
|
||||
@@ -457,7 +457,7 @@ namespace audio {
|
||||
/// @return speaker id or 0
|
||||
speakerid_t play_stream(
|
||||
const fs::path& file,
|
||||
glm::vec3 position,
|
||||
const glm::vec3& position,
|
||||
bool relative,
|
||||
float volume,
|
||||
float pitch,
|
||||
|
||||
Reference in New Issue
Block a user