src: use nullptr instead of NULL

This commit is contained in:
mlangkabel
2018-02-23 19:11:35 +01:00
parent 0df32f239e
commit ca20cb7bc9
17 changed files with 44 additions and 44 deletions
+1 -1
View File
@@ -308,7 +308,7 @@ bool ConfigManager::load(const std::shared_ptr<TextAccess> textAccess)
TiXmlDocument doc;
const char* pTest = doc.Parse(text.c_str(), 0, TIXML_ENCODING_UTF8);
if (pTest != NULL)
if (pTest != nullptr)
{
TiXmlHandle docHandle(&doc);
TiXmlNode *rootNode = docHandle.FirstChild("config").ToNode();
+8 -8
View File
@@ -15,7 +15,7 @@ namespace utility
TiXmlDocument doc;
const char* pTest = doc.Parse(text.c_str(), 0, TIXML_ENCODING_LEGACY);
if (pTest != NULL)
if (pTest != nullptr)
{
TiXmlHandle docHandle(&doc);
std::vector<std::pair<TiXmlElement*, size_t>> traversalStates;
@@ -77,7 +77,7 @@ namespace utility
TiXmlDocument doc;
const char* pTest = doc.Parse(text.c_str(), 0, TIXML_ENCODING_UTF8);
if (pTest != NULL)
if (pTest != nullptr)
{
TiXmlHandle docHandle(&doc);
TiXmlElement *rootElement = docHandle.ToNode()->FirstChildElement();
@@ -121,31 +121,31 @@ namespace utility
nodes.push_back(element);
}
if (element->FirstChildElement() != NULL)
if (element->FirstChildElement() != nullptr)
{
element = element->FirstChildElement();
}
else if (element->NextSiblingElement() != NULL)
else if (element->NextSiblingElement() != nullptr)
{
element = element->NextSiblingElement();
}
else
{
if (element == NULL)
if (element == nullptr)
{
}
while (element->Parent()->ToElement() != NULL && element->Parent()->NextSiblingElement() == NULL)
while (element->Parent()->ToElement() != nullptr && element->Parent()->NextSiblingElement() == nullptr)
{
TiXmlElement* newElement = element->Parent()->ToElement();
if (newElement == NULL)
if (newElement == nullptr)
{
}
element = newElement;
}
if (element->Parent() != NULL && element->Parent()->NextSiblingElement() != NULL)
if (element->Parent() != nullptr && element->Parent()->NextSiblingElement() != nullptr)
{
element = element->Parent()->NextSiblingElement();
}