"this" must be explicit in lambda capture

This commit is contained in:
Dan Paulat 2023-04-17 18:29:37 -05:00
parent 31db9a4315
commit a3afd71f03
19 changed files with 132 additions and 129 deletions

View file

@ -506,7 +506,7 @@ void RadarProductManager::EnableRefresh(common::RadarProductGroup group,
// Only enable refresh on available products
scwx::util::async(
[=]()
[=, this]()
{
providerManager->provider_->RequestAvailableProducts();
auto availableProducts =
@ -597,7 +597,7 @@ void RadarProductManagerImpl::RefreshData(
}
scwx::util::async(
[=]()
[=, this]()
{
auto [newObjects, totalObjects] =
providerManager->provider_->Refresh();
@ -647,7 +647,7 @@ void RadarProductManagerImpl::RefreshData(
{
providerManager->refreshTimer_.expires_after(interval);
providerManager->refreshTimer_.async_wait(
[=](const boost::system::error_code& e)
[=, this](const boost::system::error_code& e)
{
if (e == boost::system::errc::success)
{
@ -1151,7 +1151,7 @@ void RadarProductManager::UpdateAvailableProducts()
logger_->debug("UpdateAvailableProducts()");
scwx::util::async(
[=]()
[this]()
{
auto level3ProviderManager =
p->GetLevel3ProviderManager(kDefaultLevel3Product_);

View file

@ -35,7 +35,7 @@ public:
warningsProvider_ {kDefaultWarningsProviderUrl}
{
util::async(
[=]()
[this]()
{
main::Application::WaitForInitialization();
logger_->debug("Start Refresh");
@ -105,7 +105,7 @@ void TextEventManager::LoadFile(const std::string& filename)
logger_->debug("LoadFile: {}", filename);
util::async(
[=]()
[=, this]()
{
awips::TextProductFile file;
@ -217,7 +217,7 @@ void TextEventManager::Impl::Refresh()
using namespace std::chrono;
refreshTimer_.expires_after(15s);
refreshTimer_.async_wait(
[=](const boost::system::error_code& e)
[this](const boost::system::error_code& e)
{
if (e == boost::asio::error::operation_aborted)
{