aboutsummaryrefslogtreecommitdiff
path: root/xbmc/network/upnp/UPnPServer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/network/upnp/UPnPServer.cpp')
-rw-r--r--xbmc/network/upnp/UPnPServer.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/xbmc/network/upnp/UPnPServer.cpp b/xbmc/network/upnp/UPnPServer.cpp
index 7085c06599..ebd11ddb99 100644
--- a/xbmc/network/upnp/UPnPServer.cpp
+++ b/xbmc/network/upnp/UPnPServer.cpp
@@ -43,6 +43,8 @@
#include "view/GUIViewState.h"
#include "xbmc/interfaces/AnnouncementManager.h"
+#include <memory>
+
#include <Platinum/Source/Platinum/Platinum.h>
NPT_SET_LOCAL_LOGGER("xbmc.upnp.server")
@@ -601,7 +603,7 @@ CUPnPServer::OnBrowseMetadata(PLT_ActionReference& action,
id.TrimRight("/");
if (id == "virtualpath://upnproot") {
id += "/";
- item.reset(new CFileItem((const char*)id, true));
+ item = std::make_shared<CFileItem>((const char*)id, true);
item->SetLabel("Root");
item->SetLabelPreformatted(true);
object = Build(item, true, context, thumb_loader);
@@ -610,7 +612,7 @@ CUPnPServer::OnBrowseMetadata(PLT_ActionReference& action,
return NPT_FAILURE;
}
} else {
- item.reset(new CFileItem((const char*)id, false));
+ item = std::make_shared<CFileItem>((const char*)id, false);
// attempt to determine the parent of this item
std::string parent;
@@ -713,13 +715,13 @@ CUPnPServer::OnBrowseDirectChildren(PLT_ActionReference& action,
CFileItemPtr item;
// music library
- item.reset(new CFileItem("musicdb://", true));
+ item = std::make_shared<CFileItem>("musicdb://", true);
item->SetLabel("Music Library");
item->SetLabelPreformatted(true);
items.Add(item);
// video library
- item.reset(new CFileItem("library://video/", true));
+ item = std::make_shared<CFileItem>("library://video/", true);
item->SetLabel("Video Library");
item->SetLabelPreformatted(true);
items.Add(item);