Fixed lgtm alert

This commit is contained in:
emeric
2022-05-28 18:52:30 +02:00
parent d3c117ebb1
commit 8d0bbd0807
2 changed files with 4 additions and 4 deletions
@@ -213,7 +213,7 @@ FeaturesEngine::loadFromTraining(const TrainSettings& trainSettings, const Progr
}
void
FeaturesEngine::loadFromCache(FeaturesEngineCache cache)
FeaturesEngine::loadFromCache(FeaturesEngineCache&& cache)
{
LMS_LOG(RECOMMENDATION, INFO) << "Constructing features classifier from cache...";
@@ -341,9 +341,9 @@ FeaturesEngine::load(bool forceReload, const ProgressCallback& progressCallback)
{
FeaturesEngineCache::invalidate();
}
else if (const std::optional<FeaturesEngineCache> cache {FeaturesEngineCache::read()})
else if (std::optional<FeaturesEngineCache> cache {FeaturesEngineCache::read()})
{
loadFromCache(*cache);
loadFromCache(std::move(*cache));
return;
}