From f98bbe193e0093aca8d8957cec82fdbd28639915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Thu, 20 Apr 2017 00:12:52 +0200 Subject: Fix various copy instead of const ref reported by cppcheck (part 3) (#5616) * Also remove 2 non declared but defined functions * Make some functions around const ref changes const --- src/genericobject.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/genericobject.h') diff --git a/src/genericobject.h b/src/genericobject.h index 7d2ec4b14..d82650f0e 100644 --- a/src/genericobject.h +++ b/src/genericobject.h @@ -73,13 +73,16 @@ std::string gob_cmd_update_physics_override(float physics_override_speed, std::string gob_cmd_update_animation(v2f frames, float frame_speed, float frame_blend, bool frame_loop); -std::string gob_cmd_update_bone_position(std::string bone, v3f position, v3f rotation); +std::string gob_cmd_update_bone_position(const std::string &bone, v3f position, + v3f rotation); -std::string gob_cmd_update_attachment(int parent_id, std::string bone, v3f position, v3f rotation); +std::string gob_cmd_update_attachment(int parent_id, const std::string &bone, + v3f position, v3f rotation); std::string gob_cmd_update_nametag_attributes(video::SColor color); -std::string gob_cmd_update_infant(u16 id, u8 type, std::string client_initialization_data); +std::string gob_cmd_update_infant(u16 id, u8 type, + const std::string &client_initialization_data); #endif -- cgit v1.2.3