Switch to unified view

a/libupnpp/control/mediaserver.cxx b/libupnpp/control/mediaserver.cxx
...
...
62
    unordered_map<string, UPnPDeviceDesc> mydevs;
62
    unordered_map<string, UPnPDeviceDesc> mydevs;
63
63
64
    UPnPDeviceDirectory::Visitor visitor = bind(MDAccum, &mydevs, friendlyName,
64
    UPnPDeviceDirectory::Visitor visitor = bind(MDAccum, &mydevs, friendlyName,
65
                                                _1, _2);
65
                                                _1, _2);
66
    UPnPDeviceDirectory::getTheDir()->traverse(visitor);
66
    UPnPDeviceDirectory::getTheDir()->traverse(visitor);
67
    for (auto& entry : mydevs)
67
    for (auto it = mydevs.begin(); it != mydevs.end(); it++)
68
        devices.push_back(entry.second);
68
        devices.push_back(it->second);
69
    return !devices.empty();
69
    return !devices.empty();
70
}
70
}
71
71
72
MediaServer::MediaServer(const UPnPDeviceDesc& desc)
72
MediaServer::MediaServer(const UPnPDeviceDesc& desc)
73
{
73
{
74
    bool found = false;
74
    bool found = false;
75
    for (auto& entry : desc.services) {
75
    for (auto it = desc.services.begin(); it != desc.services.end(); it++) {
76
        if (ContentDirectory::isCDService(entry.serviceType)) {
76
        if (ContentDirectory::isCDService(it->serviceType)) {
77
            m_cds = CDSH(new ContentDirectory(desc, entry));
77
            m_cds = CDSH(new ContentDirectory(desc, *it));
78
            found = true;
78
            found = true;
79
            break;
79
            break;
80
        }
80
        }
81
    }
81
    }
82
    if (!found) {
82
    if (!found) {