From 051a88a7e8ef89c205feb387ef93f78c0746b1aa Mon Sep 17 00:00:00 2001 From: Daniel Hrabovcak Date: Mon, 25 May 2015 12:38:52 -0400 Subject: [PATCH] For range loops --- src/core/core.cpp | 4 ++-- src/core/coreav.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/core.cpp b/src/core/core.cpp index d801d4638..20e59b7ce 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -1330,8 +1330,8 @@ void Core::resetCallSources() { for (ToxGroupCall& call : groupCalls) { - for (QHash::iterator i = call.alSources.begin(); i != call.alSources.end(); ++i) - alDeleteSources(1, &i.value()); + for (ALuint source : call.alSources) + alDeleteSources(1, &source); call.alSources.clear(); } diff --git a/src/core/coreav.cpp b/src/core/coreav.cpp index 3642b1907..e0b6fb2de 100644 --- a/src/core/coreav.cpp +++ b/src/core/coreav.cpp @@ -629,8 +629,8 @@ void Core::leaveGroupCall(int groupId) groupCalls[groupId].active = false; disconnect(groupCalls[groupId].sendAudioTimer,0,0,0); groupCalls[groupId].sendAudioTimer->stop(); - for (QHash::iterator i = groupCalls[groupId].alSources.begin(); i != groupCalls[groupId].alSources.end(); ++i) - alDeleteSources(1, &i.value()); + for (ALuint source : groupCalls[groupId].alSources) + alDeleteSources(1, &source); groupCalls[groupId].alSources.clear(); Audio::unsuscribeInput(); delete groupCalls[groupId].sendAudioTimer;