Commit a7254fee authored by VAN TOLL Wouter's avatar VAN TOLL Wouter

Replaced NULL by nullptr (except in nanoflann.hpp).

parent 64475172
......@@ -80,7 +80,7 @@ std::vector<Agent*> WorldBase::getNeighboursFlat(Vector2D position, float search
//The behavior is probably incorrect and needs to be fixed
Agent * WorldBase::findNearestNeighborWithinRadius(size_t agent_id, const Vector2D& agentPosition, float search_radius)
{
Agent* nearestNeighbour = NULL;
Agent* nearestNeighbour = nullptr;
double nearestNeighbourDistance = search_radius;
for (size_t i = 0; i < agents_.size(); i++)
......@@ -116,7 +116,7 @@ void WorldBase::doStep()
//The behavior of finding the nearest neighbor is probably incorrect
Vector2D agentNextPosition = agents_[i]->getPosition() + agents_[i]->getNextVelocity() * delta_time_;
if(findNearestNeighborWithinRadius(i, agentNextPosition, agents_[i]->getRadius()) != NULL)
if(findNearestNeighborWithinRadius(i, agentNextPosition, agents_[i]->getRadius()) != nullptr)
{
// TODO : decide of a strategy in case of collision
// For now, we do nothing
......
......@@ -157,12 +157,12 @@ void XMLParser::load(const std::string &filename, CrowdSimulator * crowdsimulato
pl->addCostFunction(costFunction, CostFunctionParameters(funcElement));
}
} while ((funcElement = funcElement->NextSiblingElement()) != NULL);
} while ((funcElement = funcElement->NextSiblingElement()) != nullptr);
++policyIndex;
} while ((policyElement = policyElement->NextSiblingElement()) != NULL);
} while ((policyElement = policyElement->NextSiblingElement()) != nullptr);
......@@ -248,7 +248,7 @@ void XMLParser::load(const std::string &filename, CrowdSimulator * crowdsimulato
agent_data->setPolicy(IDToPolicyMap[agentPolicyID]);
++agentIndex;
} while ((agentElement = agentElement->NextSiblingElement()) != NULL);
} while ((agentElement = agentElement->NextSiblingElement()) != nullptr);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment