1
0
mirror of https://github.com/vcmi/vcmi.git synced 2026-05-22 09:55:17 +02:00

Review fixes

This commit is contained in:
Ivan Savenko
2024-06-17 09:43:22 +00:00
parent e699941a39
commit 431b2865a4
2 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -1203,7 +1203,10 @@ void AINodeStorage::calculateTownPortalTeleportations(std::vector<CGPathNode *>
std::vector<const ChainActor *> actorsVector(actorsOfInitial.begin(), actorsOfInitial.end());
tbb::concurrent_vector<CGPathNode *> output;
if(false) //if (actorsVector.size() * initialNodes.size() > 1000)
// TODO: re-enable after fixing thread races. See issue for details:
// https://github.com/vcmi/vcmi/pull/4130
#if 0
if (actorsVector.size() * initialNodes.size() > 1000)
{
tbb::parallel_for(tbb::blocked_range<size_t>(0, actorsVector.size()), [&](const tbb::blocked_range<size_t> & r)
{
@@ -1216,6 +1219,7 @@ void AINodeStorage::calculateTownPortalTeleportations(std::vector<CGPathNode *>
std::copy(output.begin(), output.end(), std::back_inserter(initialNodes));
}
else
#endif
{
for(auto actor : actorsVector)
{