src: use nullptr instead of NULL
This commit is contained in:
@@ -62,7 +62,7 @@ bool LicenseChecker::isCurrentLicenseValid()
|
||||
LicenseChecker::LicenseState LicenseChecker::checkCurrentLicense() const
|
||||
{
|
||||
ApplicationSettings* appSettings = ApplicationSettings::getInstance().get();
|
||||
if (appSettings == NULL)
|
||||
if (appSettings == nullptr)
|
||||
{
|
||||
LOG_ERROR_STREAM(<< "Unable to retrieve app settings");
|
||||
return LICENSE_EMPTY;
|
||||
|
||||
@@ -22,12 +22,12 @@ Component::~Component()
|
||||
{
|
||||
if (m_controller)
|
||||
{
|
||||
m_controller->setComponent(NULL);
|
||||
m_controller->setComponent(nullptr);
|
||||
}
|
||||
|
||||
if (m_view)
|
||||
{
|
||||
m_view->setComponent(NULL);
|
||||
m_view->setComponent(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ ControllerType* View::getController()
|
||||
{
|
||||
return m_component->getController<ControllerType>();
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#endif // VIEW_H
|
||||
|
||||
@@ -13,7 +13,7 @@ void SharedIndexerCommand::fromLocal(IndexerCommand* indexerCommand)
|
||||
setIndexedPaths(indexerCommand->getIndexedPaths());
|
||||
setExcludedPaths(indexerCommand->getExcludedPath());
|
||||
|
||||
if (dynamic_cast<IndexerCommandCxxCdb*>(indexerCommand) != NULL)
|
||||
if (dynamic_cast<IndexerCommandCxxCdb*>(indexerCommand) != nullptr)
|
||||
{
|
||||
IndexerCommandCxxCdb* cmd = dynamic_cast<IndexerCommandCxxCdb*>(indexerCommand);
|
||||
|
||||
@@ -23,7 +23,7 @@ void SharedIndexerCommand::fromLocal(IndexerCommand* indexerCommand)
|
||||
setSystemHeaderSearchPaths(cmd->getSystemHeaderSearchPaths());
|
||||
setFrameworkSearchhPaths(cmd->getFrameworkSearchPaths());
|
||||
}
|
||||
else if (dynamic_cast<IndexerCommandCxxEmpty*>(indexerCommand) != NULL)
|
||||
else if (dynamic_cast<IndexerCommandCxxEmpty*>(indexerCommand) != nullptr)
|
||||
{
|
||||
IndexerCommandCxxEmpty* cmd = dynamic_cast<IndexerCommandCxxEmpty*>(indexerCommand);
|
||||
|
||||
@@ -34,7 +34,7 @@ void SharedIndexerCommand::fromLocal(IndexerCommand* indexerCommand)
|
||||
setSystemHeaderSearchPaths(cmd->getSystemHeaderSearchPaths());
|
||||
setFrameworkSearchhPaths(cmd->getFrameworkSearchPaths());
|
||||
}
|
||||
else if (dynamic_cast<IndexerCommandJava*>(indexerCommand) != NULL)
|
||||
else if (dynamic_cast<IndexerCommandJava*>(indexerCommand) != nullptr)
|
||||
{
|
||||
IndexerCommandJava* cmd = dynamic_cast<IndexerCommandJava*>(indexerCommand);
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user