for (int i = 0; i < level.PathLookupVectors()[globalNodePositionIndex][globalNodeChoice].size(); i++)
{
//adds the correct nodes to the search
search.push_back(level.PathLookupVectors()[globalNodePositionIndex][globalNodeChoice][i]);
}
and it’s a 64 bit system.
the program is taking about 30 seconds to execute one pass of the loop. Is there a reason why this is happeneing? I’m not sure what info you guys will need but ask and i’ll get it for you.
search is a vector of integers and pathLookupVectors is a vector of vectors of vectors of ints.
search usually ends up being populated by an average of 27 integers but can be a little higher or as low as one.
I did notice I’m passing pathLookupVectors by value. could that be the problem?
It’s difficult to say without seeing all the relevant code, but I suspect that:
…might return a
vectorof some kind by-value, rather than by-pointer- or by-reference. This is just a guess, but if this is so, you could be creating temporary copies of the whole vector, and then modifying that.