Switch path stuff to vectors

This should be more CPU cache friendly compared to lists so should
be faster. (profiling looked promising)
This commit is contained in:
Michael Cook (mackal)
2014-12-17 01:52:00 -05:00
parent 5099010840
commit a14f8058da
7 changed files with 39 additions and 38 deletions
+2 -2
View File
@@ -5714,7 +5714,7 @@ void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app)
}
else
{
std::list<int> pathlist = zone->pathing->FindRoute(Start, End);
std::vector<int> pathlist = zone->pathing->FindRoute(Start, End);
if (pathlist.size() == 0)
{
@@ -5753,7 +5753,7 @@ void Client::Handle_OP_FindPersonRequest(const EQApplicationPacket *app)
p.z = GetZ();
points.push_back(p);
for (std::list<int>::iterator Iterator = pathlist.begin(); Iterator != pathlist.end(); ++Iterator)
for (auto Iterator = pathlist.begin(); Iterator != pathlist.end(); ++Iterator)
{
if ((*Iterator) == -1) // Teleporter
{