summaryrefslogtreecommitdiff
path: root/src/memchecker.cc
diff options
context:
space:
mode:
authorChristian Glöckner <cgloeckner@freenet.de>2016-05-09 11:09:06 +0200
committerChristian Glöckner <cgloeckner@freenet.de>2016-05-26 17:52:21 +0200
commit52b37cac974eb150d49eee1f0b5ba3654f6d7716 (patch)
tree353daa0524c2f918caeac17b704b016e651af6e2 /src/memchecker.cc
parent355f9e4e2ebace6cce52a277cbaf1d1bfc904d61 (diff)
Instrument Vector using UniquePtr
Diffstat (limited to 'src/memchecker.cc')
-rw-r--r--src/memchecker.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/memchecker.cc b/src/memchecker.cc
index 81c9da7..6d66965 100644
--- a/src/memchecker.cc
+++ b/src/memchecker.cc
@@ -73,12 +73,12 @@ uint64_t MemChecker::calcNeededMemory(const DrumKit& drumkit) const
uint64_t needed_memory = 0;
// Calculate memory usage of all instruments of drumkit.
- for(auto instrument : drumkit.instruments)
+ for(auto& instr_ptr: drumkit.instruments)
{
- const auto& audiofiles = instrument->audiofiles;
+ const auto& audiofiles = instr_ptr->audiofiles;
// Calculate memory usage of all audiofiles.
- for(auto audiofile : audiofiles)
+ for(auto& audiofile: audiofiles)
{
needed_memory += calcBytesPerChannel(audiofile->filename);
}