mirror of
https://github.com/SWG-Source/src.git
synced 2026-10-05 22:12:52 -04:00
newer standards prefer nullptr over NULL - this is most of them but there are others too
This commit is contained in:
@@ -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;
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user