This commit is contained in:
Daniel Girardeau-Montaut
2019-03-26 14:28:27 +01:00
parent e9c145ee47
commit da6293e522
14 changed files with 420 additions and 225 deletions
+21
View File
@@ -133,3 +133,24 @@ bool Feature::PerformMathOp(const IScalarFieldWrapper& sf1, const IScalarFieldWr
return true;
}
bool Feature::ExtractSources(const Set& features, Source::Set& sources)
{
sources.clear();
try
{
sources.reserve(features.size());
}
catch (const std::bad_alloc&)
{
ccLog::Warning("Not enough memory");
return false;
}
for (Feature::Shared f : features)
{
sources.push_back(f->source);
}
return true;
}