From 45521d593560b120d406acfb9926697e7ad5e423 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 23 Mar 2016 21:57:41 +0100 Subject: More cleanup. --- src/drumkit.cc | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'src/drumkit.cc') diff --git a/src/drumkit.cc b/src/drumkit.cc index 1b95c87..f25a6ea 100644 --- a/src/drumkit.cc +++ b/src/drumkit.cc @@ -39,12 +39,11 @@ DrumKit::~DrumKit() void DrumKit::clear() { - Instruments::iterator i = instruments.begin(); - while(i != instruments.end()) + for(auto& instrument : instruments) { - delete *i; - i++; + delete instrument; } + instruments.clear(); channels.clear(); @@ -78,20 +77,3 @@ size_t DrumKit::getSamplerate() const { return _samplerate; } - -#ifdef TEST_DRUMKIT -// Additional dependency files -// deps: -// Required cflags (autoconf vars may be used) -// cflags: -// Required link options (autoconf vars may be used) -// libs: -#include "test.h" - -TEST_BEGIN; - -// TODO: Put some testcode here (see test.h for usable macros). - -TEST_END; - -#endif /*TEST_DRUMKIT*/ -- cgit v1.2.3