diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/theme.cpp | 6 | ||||
-rw-r--r-- | src/gui/windows/questswindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/serverdialog.cpp | 20 |
3 files changed, 11 insertions, 17 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 8a1eea3f3..d588ecdb3 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -1156,15 +1156,15 @@ ImageSet *Theme::getImageSetFromThemeXml(const std::string &name, #define readValue(name) \ info->name = reinterpret_cast<const char*>(\ - xmlNodeGetContent(infoNode)) + XmlNodeGetContent(infoNode)) #define readIntValue(name) \ info->name = atoi(reinterpret_cast<const char*>(\ - xmlNodeGetContent(infoNode))) + XmlNodeGetContent(infoNode))) #define readFloatValue(name) \ info->name = static_cast<float>(atof(reinterpret_cast<const char*>(\ - xmlNodeGetContent(infoNode)))) + XmlNodeGetContent(infoNode)))) ThemeInfo *Theme::loadInfo(const std::string &themeName) { diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp index 1c23b9400..3bea8577f 100644 --- a/src/gui/windows/questswindow.cpp +++ b/src/gui/windows/questswindow.cpp @@ -228,7 +228,7 @@ void QuestsWindow::loadQuest(const int var, const XmlNodePtr node) if (!xmlTypeEqual(dataNode, XML_ELEMENT_NODE)) continue; const char *const data = reinterpret_cast<const char*>( - xmlNodeGetContent(dataNode)); + XmlNodeGetContent(dataNode)); if (!data) continue; std::string str = translator->getStr(data); diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index c61b58f6d..1049085b4 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -530,7 +530,7 @@ void ServerDialog::loadServers(const bool addNew) server.port = defaultPortForServerType(server.type); } } - else if (!subNode->xmlChildrenNode) + else if (!XmlHaveChildContent(subNode)) { continue; } @@ -539,34 +539,28 @@ void ServerDialog::loadServers(const bool addNew) && server.description.empty()) || (!lang.empty() && xmlNameEqual(subNode, description2.c_str()))) { - server.description = reinterpret_cast<const char*>( - subNode->xmlChildrenNode->content); + server.description = XmlChildContent(subNode); } else if (xmlNameEqual(subNode, "registerurl")) { - server.registerUrl = reinterpret_cast<const char*>( - subNode->xmlChildrenNode->content); + server.registerUrl = XmlChildContent(subNode); } else if (xmlNameEqual(subNode, "onlineListUrl")) { - server.onlineListUrl = reinterpret_cast<const char*>( - subNode->xmlChildrenNode->content); + server.onlineListUrl = XmlChildContent(subNode); } else if (xmlNameEqual(subNode, "support")) { - server.supportUrl = reinterpret_cast<const char*>( - subNode->xmlChildrenNode->content); + server.supportUrl = XmlChildContent(subNode); } else if (xmlNameEqual(subNode, "persistentIp")) { - std::string text = reinterpret_cast<const char*>( - subNode->xmlChildrenNode->content); + std::string text = XmlChildContent(subNode); server.persistentIp = (text == "1" || text == "true"); } else if (xmlNameEqual(subNode, "updateMirror")) { - server.updateMirrors.push_back(reinterpret_cast<const char*>( - subNode->xmlChildrenNode->content)); + server.updateMirrors.push_back(XmlChildContent(subNode)); } } |