fix up libxmltree interfaces, so that useless casts can be removed

Lots of places hat casts from (const char*) to (char *) to silence
a "deprecated conversion" warning. Instead of casting (which is
inherently wrong), fix up the libxmltree interfaces.

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@117 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
seife
2009-12-22 16:11:40 +00:00
parent 69928c641b
commit 8070a9613d
14 changed files with 276 additions and 225 deletions

View File

@@ -223,7 +223,7 @@ std::vector<UPnPEntry> *CUpnpBrowserGui::decodeResult(std::string result)
{
bool isdir;
std::string title, artist = "", album = "", id, children;
char *type, *p;
const char *type, *p;
if (!strcmp(node->GetType(), "container"))
{
@@ -239,18 +239,18 @@ std::vector<UPnPEntry> *CUpnpBrowserGui::decodeResult(std::string result)
{
p=snode->GetData();
if (!p)
p=(char *) "";
p = "";
title=std::string(p);
}
}
p = node->GetAttributeValue((char *) "id");
p = node->GetAttributeValue("id");
if (!p)
p=(char *) "";
p = "";
id=std::string(p);
p = node->GetAttributeValue((char *) "childCount");
p = node->GetAttributeValue("childCount");
if (!p)
p=(char *) "";
p = "";
children=std::string(p);
UPnPEntry entry={id, isdir, title, artist, album, children, resources, -1};
@@ -275,40 +275,40 @@ std::vector<UPnPEntry> *CUpnpBrowserGui::decodeResult(std::string result)
{
p=snode->GetData();
if (!p)
p=(char *) "";
p = "";
title=std::string(p);
}
else if (!strcmp(type,"artist"))
{
p=snode->GetData();
if (!p)
p=(char *) "";
p = "";
artist=std::string(p);
}
else if (!strcmp(type,"album"))
{
p=snode->GetData();
if (!p)
p=(char *) "";
p = "";
album=std::string(p);
}
else if (!strcmp(type,"res"))
{
p = snode->GetData();
if (!p)
p=(char *) "";
p = "";
url=std::string(p);
p = snode->GetAttributeValue((char *) "size");
p = snode->GetAttributeValue("size");
if (!p)
p=(char *) "0";
p = "0";
size=std::string(p);
p = snode->GetAttributeValue((char *) "duration");
p = snode->GetAttributeValue("duration");
if (!p)
p=(char *) "";
p = "";
duration=std::string(p);
p = snode->GetAttributeValue((char *) "protocolInfo");
p = snode->GetAttributeValue("protocolInfo");
if (!p)
p=(char *) "";
p = "";
protocol=std::string(p);
UPnPResource resource = {url, protocol, size, duration};
resources.push_back(resource);
@@ -345,14 +345,14 @@ std::vector<UPnPEntry> *CUpnpBrowserGui::decodeResult(std::string result)
}
}
}
p = node->GetAttributeValue((char *) "id");
p = node->GetAttributeValue("id");
if (!p)
p=(char *) "";
p = "";
id=std::string(p);
p = node->GetAttributeValue((char *) "childCount");
p = node->GetAttributeValue("childCount");
if (!p)
p=(char *) "";
p = "";
children=std::string(p);
UPnPEntry entry={id, isdir, title, artist, album, children, resources, preferred};