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:
@@ -64,7 +64,7 @@ public:
|
||||
std::shared_ptr<Inventory> inv, entityid_t eid);
|
||||
~Player();
|
||||
|
||||
void teleport(glm::vec3 position);
|
||||
void teleport(const glm::vec3 &position);
|
||||
void updateEntity();
|
||||
void updateInput(PlayerInput& input, float delta);
|
||||
void updateSelectedEntity();
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
|
||||
Hitbox* getHitbox();
|
||||
|
||||
void setSpawnPoint(glm::vec3 point);
|
||||
void setSpawnPoint(const glm::vec3 &spawnpoint);
|
||||
glm::vec3 getSpawnPoint() const;
|
||||
|
||||
std::unique_ptr<dynamic::Map> serialize() const override;
|
||||
|
||||
Reference in New Issue
Block a user