From 4f4ac639f9bea3fcacf439213aabd0b70c678ecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gl=C3=B6ckner?= Date: Tue, 29 Mar 2016 16:08:45 +0200 Subject: API Refactoring for class Instrument --- src/instrument.cc | 2 +- src/instrument.h | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/instrument.cc b/src/instrument.cc index 9dec687..9f18233 100644 --- a/src/instrument.cc +++ b/src/instrument.cc @@ -153,7 +153,7 @@ std::string Instrument::getGroup() const return _group; } -void Instrument::setGroup(std::string g) +void Instrument::setGroup(const std::string& g) { _group = g; } diff --git a/src/instrument.h b/src/instrument.h index 5dc656d..de5546b 100644 --- a/src/instrument.h +++ b/src/instrument.h @@ -24,8 +24,7 @@ * along with DrumGizmo; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef __DRUMGIZMO_INSTRUMENT_H__ -#define __DRUMGIZMO_INSTRUMENT_H__ +#pragma once #include #include @@ -52,7 +51,7 @@ public: std::string getDescription() const; std::string getGroup() const; - void setGroup(std::string group); + void setGroup(const std::string& group); // std::map channelmap; @@ -85,5 +84,3 @@ private: // typedef std::map< std::string, Instrument > Instruments; typedef std::vector Instruments; - -#endif /*__DRUMGIZMO_INSTRUMENT_H__*/ -- cgit v1.2.3