use structured binding declarations

Shorter.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-10-22 01:36:13 -07:00
committed by Max Kellermann
parent da642b2890
commit 44378b7dbe
14 changed files with 45 additions and 57 deletions
+2 -3
View File
@@ -40,8 +40,7 @@ printAudioDevices(Response &r, const MultipleOutputs &outputs)
ao.GetName(), ao.GetPluginName(),
ao.IsEnabled());
for (const auto &a : ao.GetAttributes())
r.Format("attribute: %s=%s\n",
a.first.c_str(), a.second.c_str());
for (const auto &[attribute, value] : ao.GetAttributes())
r.Format("attribute: %s=%s\n", attribute.c_str(), value.c_str());
}
}
+5 -3
View File
@@ -632,9 +632,11 @@ void WasapiOutput::OpenDevice() {
CLSCTX_INPROC_SERVER);
if (enumerate_devices && SafeTry([this]() { EnumerateDevices(); })) {
for (const auto &desc : device_desc) {
FormatNotice(wasapi_output_domain, "Device \"%u\" \"%s\"",
desc.first, desc.second.c_str());
for (const auto &[device, desc] : device_desc) {
FormatNotice(wasapi_output_domain,
"Device \"%u\" \"%s\"",
device,
desc.c_str());
}
}