Skip to content

Commit

Permalink
fix left out components bug
Browse files Browse the repository at this point in the history
Signed-off-by: John Shepherd <[email protected]>
  • Loading branch information
John Shepherd committed Dec 17, 2020
1 parent 213071e commit 0ba4684
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/EntityComponentManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,8 @@ void EntityComponentManager::CalculateComponentThreadLoad() const
// Set the number of threads to spawn to the min of the calculated thread
// count or max threads that the hardware supports
this->dataPtr->numComponentThreads = std::min(numThreads, maxThreads);
int componentsPerThread = numComponents / this->dataPtr->numComponentThreads;
int componentsPerThread = std::ceil(static_cast<double>(numComponents) /
this->dataPtr->numComponentThreads);

// Push back the starting iterator
this->dataPtr->entityComponentIterators.push_back(startIt);
Expand Down

0 comments on commit 0ba4684

Please sign in to comment.