From 6ac5946767ba41d7eff9eb8521519007fdc58750 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 23 Mar 2016 21:57:41 +0100 Subject: More cleanup. --- src/sample.h | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) (limited to 'src/sample.h') diff --git a/src/sample.h b/src/sample.h index 26c7be2..f00db13 100644 --- a/src/sample.h +++ b/src/sample.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_SAMPLE_H__ -#define __DRUMGIZMO_SAMPLE_H__ +#pragma once #include #include @@ -33,33 +32,22 @@ #include "channel.h" #include "audiofile.h" -typedef std::map< Channel*, AudioFile* > AudioFiles; +using AudioFiles = std::map; -class InstrumentParser; class Sample { - friend class InstrumentParser; - friend class PowerList; + friend class InstrumentParser; + friend class PowerList; public: - Sample(std::string name, float power); - ~Sample(); + Sample(const std::string& name, float power); + ~Sample(); - AudioFile *getAudioFile(InstrumentChannel *c); + AudioFile* getAudioFile(InstrumentChannel *instrument_channel); private: - void addAudioFile(InstrumentChannel *c, AudioFile *a); + void addAudioFile(InstrumentChannel* instrument_channel, + AudioFile* audio_file); - std::string name; - float power; - AudioFiles audiofiles; + std::string name; + float power; + AudioFiles audiofiles; }; - -/* - * - * - * - * - * - * - * - */ -#endif/*__DRUMGIZMO_SAMPLE_H__*/ -- cgit v1.2.3