From 6f685ae7ac93a04963532c21152fa0491931988b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Fri, 29 Jan 2016 20:59:43 +0100 Subject: Remove pointer from audiofiles map. --- test/audiocachefiletest.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/audiocachefiletest.cc b/test/audiocachefiletest.cc index b7839b7..6f84ba2 100644 --- a/test/audiocachefiletest.cc +++ b/test/audiocachefiletest.cc @@ -39,12 +39,14 @@ public: //void release(const std::string& filename); int getRef(const std::string& filename) { - if(audiofiles.find(filename) == audiofiles.end()) + auto it = audiofiles.find(filename); + + if(it == audiofiles.end()) { return -1; } - return audiofiles[filename]->ref; + return (it->second).ref; } }; -- cgit v1.2.3