newer standards prefer nullptr over NULL - this is most of them but there are others too

This commit is contained in:
DarthArgus
2016-02-15 00:07:31 -06:00
parent 6bb5137dc4
commit 03dc62efba
937 changed files with 14983 additions and 14983 deletions
@@ -40,7 +40,7 @@ int main(int argc, char ** argv)
SetupSharedNetwork::getDefaultServerSetupData(networkSetupData);
SetupSharedNetwork::install(networkSetupData);
SetupSharedRandom::install(static_cast<uint32>(time(NULL))); //lint !e1924 !e64 // NULL is a C-Style cast?
SetupSharedRandom::install(static_cast<uint32>(time(nullptr))); //lint !e1924 !e64 // nullptr is a C-Style cast?
Os::setProgramName("MetricsServer");
//setup the server
@@ -169,19 +169,19 @@ void MetricsGatheringConnection::update(const std::vector<MetricsPair> & data)
//note: we know that the "isSecret", and "isLocked" nodes will come after the "population" node in the list
// we are iterating over, so they will override the population setting
if (strstr((*dataIter).m_label.c_str(), "population") != NULL)
if (strstr((*dataIter).m_label.c_str(), "population") != nullptr)
{
// there are nodes under the population node, so don't interpret them as the population
if (strstr((*dataIter).m_label.c_str(), "population.") == NULL)
if (strstr((*dataIter).m_label.c_str(), "population.") == nullptr)
mon->set(MetricsServer::getWorldCountChannel(), std::max((*dataIter).m_value, 0));
}
else if (strstr((*dataIter).m_label.c_str(), "isSecret") != NULL
|| strstr((*dataIter).m_label.c_str(), "isLocked") != NULL)
else if (strstr((*dataIter).m_label.c_str(), "isSecret") != nullptr
|| strstr((*dataIter).m_label.c_str(), "isLocked") != nullptr)
{
if ((*dataIter).m_value == 1)
mon->set(MetricsServer::getWorldCountChannel(), STATUS_LOCKED);
}
else if (strstr((*dataIter).m_label.c_str(), "isLoading") != NULL)
else if (strstr((*dataIter).m_label.c_str(), "isLoading") != nullptr)
{
// include in the root node description how
// long the cluster has been loading
@@ -226,19 +226,19 @@ void MetricsGatheringConnection::update(const std::vector<MetricsPair> & data)
//note: we know that the "isSecret", and "isLocked" nodes will come after the "population" node in the list
// we are iterating over, so they will override the population setting
if (strstr((*dataIter).m_label.c_str(), "population") != NULL)
if (strstr((*dataIter).m_label.c_str(), "population") != nullptr)
{
// there are nodes under the population node, so don't interpret them as the population
if (strstr((*dataIter).m_label.c_str(), "population.") == NULL)
if (strstr((*dataIter).m_label.c_str(), "population.") == nullptr)
mon->set(MetricsServer::getWorldCountChannel(), std::max((*dataIter).m_value, 0));
}
else if (strstr((*dataIter).m_label.c_str(), "isSecret") != NULL
|| strstr((*dataIter).m_label.c_str(), "isLocked") != NULL)
else if (strstr((*dataIter).m_label.c_str(), "isSecret") != nullptr
|| strstr((*dataIter).m_label.c_str(), "isLocked") != nullptr)
{
if ((*dataIter).m_value == 1)
mon->set(MetricsServer::getWorldCountChannel(), STATUS_LOCKED);
}
else if (strstr((*dataIter).m_label.c_str(), "isLoading") != NULL)
else if (strstr((*dataIter).m_label.c_str(), "isLoading") != nullptr)
{
// include in the root node description how
// long the cluster has been loading
@@ -29,8 +29,8 @@ std::string MetricsServer::m_worldCountChannelDescription;
bool MetricsServer::m_done = false;
Service* MetricsServer::m_metricsService;
CMonitorAPI * MetricsServer::m_soeMonitor;
Service * MetricsServer::ms_service = NULL;
TaskConnection * MetricsServer::ms_taskConnection = NULL;
Service * MetricsServer::ms_service = nullptr;
TaskConnection * MetricsServer::ms_taskConnection = nullptr;
//----------------------------------------------------------------