diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/audiocachefiletest.cc | 6 |
1 files changed, 4 insertions, 2 deletions
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; } }; |