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

This commit is contained in:
Max Kellermann 2017-08-25 10:11:35 +02:00
parent 732f6aaa30
commit d0734e27ba
1 changed files with 3 additions and 4 deletions

View File

@ -313,11 +313,10 @@ UPnPDeviceDirectory::GetDirectories()
ExpireDevices();
std::vector<ContentDirectoryService> out;
for (auto dit = directories.begin();
dit != directories.end(); dit++) {
for (const auto &service : dit->device.services) {
for (const auto &descriptor : directories) {
for (const auto &service : descriptor.device.services) {
if (isCDService(service.serviceType.c_str())) {
out.emplace_back(dit->device, service);
out.emplace_back(descriptor.device, service);
}
}
}