diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2017-12-22 01:14:16 +0100 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2017-12-22 01:14:16 +0100 |
commit | 2db1b3295bd702d524ed0a9e50b812d648198319 (patch) | |
tree | d44d6a560c8a40e5d06b00d7af862e1ebbdf7c8c /src/soundio | |
parent | 6ecf51b8fc6b8489cbe8c88c19fb6dbdd904f6d2 (diff) |
backported qAsConst and used it
Diffstat (limited to 'src/soundio')
-rw-r--r-- | src/soundio/soundmanager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/soundio/soundmanager.cpp b/src/soundio/soundmanager.cpp index def638222c..43372046e1 100644 --- a/src/soundio/soundmanager.cpp +++ b/src/soundio/soundmanager.cpp @@ -166,7 +166,7 @@ void SoundManager::closeDevices(bool sleepAfterClosing) { //qDebug() << "SoundManager::closeDevices()"; bool closed = false; - for (const auto& pDevice: m_devices) { + for (const auto& pDevice: qAsConst(m_devices)) { if (pDevice->isOpen()) { // NOTE(rryan): As of 2009 (?) it has been safe to close() a SoundDevice // while callbacks are active. @@ -186,7 +186,7 @@ void SoundManager::closeDevices(bool sleepAfterClosing) { // TODO(rryan): Should we do this before SoundDevice::close()? No! Because // then the callback may be running when we call // onInputDisconnected/onOutputDisconnected. - for (const auto& pDevice: m_devices) { + for (const auto& pDevice: qAsConst(m_devices)) { for (const auto& in: pDevice->inputs()) { // Need to tell all registered AudioDestinations for this AudioInput // that the input was disconnected. @@ -371,7 +371,7 @@ SoundDeviceError SoundManager::setupDevices() { QList<DeviceMode> toOpen; bool haveOutput = false; // loop over all available devices - for (const auto& pDevice: m_devices) { + for (const auto& pDevice: qAsConst(m_devices)) { DeviceMode mode = {pDevice, false, false}; pDevice->clearInputs(); pDevice->clearOutputs(); |