lib/upnp/Device: use std::forward_list instead of std::vector

This commit is contained in:
Max Kellermann 2024-01-04 20:51:03 +01:00
parent 1fca16737d
commit feeb21577f
2 changed files with 3 additions and 3 deletions

View File

@ -64,7 +64,7 @@ protected:
trimstring(*value); trimstring(*value);
value = nullptr; value = nullptr;
} else if (!strcmp(name, "service")) { } else if (!strcmp(name, "service")) {
m_device.services.emplace_back(std::move(m_tservice)); m_device.services.emplace_front(std::move(m_tservice));
m_tservice = {}; m_tservice = {};
} }
} }

View File

@ -3,7 +3,7 @@
#pragma once #pragma once
#include <vector> #include <forward_list>
#include <string> #include <string>
/** /**
@ -43,7 +43,7 @@ public:
// Model name: e.g. MediaTomb, DNS-327L ("modelName") // Model name: e.g. MediaTomb, DNS-327L ("modelName")
std::string modelName; std::string modelName;
// Services provided by this device. // Services provided by this device.
std::vector<UPnPService> services; std::forward_list<UPnPService> services;
/** Build device from xml description downloaded from discovery /** Build device from xml description downloaded from discovery
* @param url where the description came from * @param url where the description came from