Commit d0734e27 authored by Max Kellermann's avatar Max Kellermann

lib/upnp/Discovery: use range-based "for"

parent 732f6aaa
...@@ -313,11 +313,10 @@ UPnPDeviceDirectory::GetDirectories() ...@@ -313,11 +313,10 @@ UPnPDeviceDirectory::GetDirectories()
ExpireDevices(); ExpireDevices();
std::vector<ContentDirectoryService> out; std::vector<ContentDirectoryService> out;
for (auto dit = directories.begin(); for (const auto &descriptor : directories) {
dit != directories.end(); dit++) { for (const auto &service : descriptor.device.services) {
for (const auto &service : dit->device.services) {
if (isCDService(service.serviceType.c_str())) { if (isCDService(service.serviceType.c_str())) {
out.emplace_back(dit->device, service); out.emplace_back(descriptor.device, service);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment