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/sound.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/sound.h') diff --git a/src/sound.h b/src/sound.h index ba2d629d2..d13799eac 100644 --- a/src/sound.h +++ b/src/sound.h @@ -34,13 +34,15 @@ public: struct SimpleSoundSpec { + SimpleSoundSpec(const std::string &name = "", float gain = 1.0) : + name(name), + gain(gain) + {} + + bool exists() const { return name != ""; } + std::string name; float gain; - SimpleSoundSpec(std::string name = "", float gain = 1.0) : name(name), gain(gain) - { - } - bool exists() { return name != ""; } - // Serialization intentionally left out }; class ISoundManager -- cgit v1.2.3