mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
ThreadPool implementation. It runs, but dies from race conditions.
This commit is contained in:
@@ -179,6 +179,30 @@ rmg::Path Zone::searchPath(const int3 & src, bool onlyStraight, const std::funct
|
||||
return searchPath(rmg::Area({src}), onlyStraight, areafilter);
|
||||
}
|
||||
|
||||
TRMGJob Zone::getNextJob()
|
||||
{
|
||||
for (auto& modificator : modificators)
|
||||
{
|
||||
if (modificator->hasJobs())
|
||||
{
|
||||
return modificator->getNextJob();
|
||||
}
|
||||
}
|
||||
return TRMGJob();
|
||||
}
|
||||
|
||||
bool Zone::hasJobs()
|
||||
{
|
||||
for (auto& modificator : modificators)
|
||||
{
|
||||
if (modificator->hasJobs())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Zone::connectPath(const rmg::Path & path)
|
||||
///connect current tile to any other free tile within zone
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user