refs #624 Use generic lambda to reduce redundancy in relation to CWorker::thenWithResult.

This commit is contained in:
Mathew Sutcliffe
2016-03-20 00:40:03 +00:00
parent 34512cefbe
commit 3c2285e46b
2 changed files with 3 additions and 3 deletions

View File

@@ -115,7 +115,7 @@ namespace BlackMisc
auto aircraftCfgEntriesList = this->performParsing(rootDirectory, excludedDirectories, &ok);
return std::make_pair(aircraftCfgEntriesList, ok);
});
m_parserWorker->thenWithResult<std::pair<CAircraftCfgEntriesList, bool>>(this, [this](const std::pair<CAircraftCfgEntriesList, bool> &pair)
m_parserWorker->thenWithResult<std::pair<CAircraftCfgEntriesList, bool>>(this, [this](const auto &pair)
{
if (pair.second) { this->updateCfgEntriesList(pair.first); }
});

View File

@@ -95,9 +95,9 @@ namespace BlackMisc
auto models = performParsing(rootDirectory, excludedDirectories);
return models;
});
m_parserWorker->thenWithResult<CAircraftModelList>(this, [this](const CAircraftModelList & models)
m_parserWorker->thenWithResult<CAircraftModelList>(this, [this](const auto & models)
{
updateInstalledModels(models);
this->updateInstalledModels(models);
});
}
else if (mode == ModeBlocking)