From 9f5c6d29b2958b10d0a801fdfdf557e7ef9b09d5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 28 May 2020 15:57:37 +0200 Subject: [PATCH] output/osx: use range-based `for` --- src/output/plugins/OSXOutputPlugin.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/output/plugins/OSXOutputPlugin.cxx b/src/output/plugins/OSXOutputPlugin.cxx index 5077a20b2..291b5ec89 100644 --- a/src/output/plugins/OSXOutputPlugin.cxx +++ b/src/output/plugins/OSXOutputPlugin.cxx @@ -400,11 +400,11 @@ osx_output_set_device_format(AudioDeviceID dev_id, const auto format_list = AudioObjectGetPropertyDataArray(stream, aopa_stream_phys_formats); - const size_t format_count = format_list.size(); float output_score = 0; - for (size_t j = 0; j < format_count; j++) { - AudioStreamBasicDescription format_desc = format_list[j].mFormat; + + for (const auto &format : format_list) { + AudioStreamBasicDescription format_desc = format.mFormat; std::string format_string; // for devices with kAudioStreamAnyRate