mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:30:05 +00:00 
			
		
		
		
	"this" must be explicit in lambda capture
This commit is contained in:
		
							parent
							
								
									31db9a4315
								
							
						
					
					
						commit
						a3afd71f03
					
				
					 19 changed files with 132 additions and 129 deletions
				
			
		|  | @ -332,7 +332,7 @@ void AlertLayerHandler::UpdateAlerts() | |||
|    using namespace std::chrono; | ||||
|    alertUpdateTimer_.expires_after(15s); | ||||
|    alertUpdateTimer_.async_wait( | ||||
|       [=](const boost::system::error_code& e) | ||||
|       [this](const boost::system::error_code& e) | ||||
|       { | ||||
|          if (e == boost::asio::error::operation_aborted) | ||||
|          { | ||||
|  |  | |||
|  | @ -110,7 +110,7 @@ void ColorTableLayer::Initialize() | |||
|    connect(context()->radar_product_view().get(), | ||||
|            &view::RadarProductView::ColorTableUpdated, | ||||
|            this, | ||||
|            [=]() { p->colorTableNeedsUpdate_ = true; }); | ||||
|            [this]() { p->colorTableNeedsUpdate_ = true; }); | ||||
| } | ||||
| 
 | ||||
| void ColorTableLayer::Render( | ||||
|  |  | |||
|  | @ -797,15 +797,15 @@ void MapWidgetImpl::RadarProductManagerConnect() | |||
|       connect(radarProductManager_.get(), | ||||
|               &manager::RadarProductManager::Level3ProductsChanged, | ||||
|               this, | ||||
|               [&]() { emit widget_->Level3ProductsChanged(); }); | ||||
|               [this]() { emit widget_->Level3ProductsChanged(); }); | ||||
| 
 | ||||
|       connect( | ||||
|          radarProductManager_.get(), | ||||
|          &manager::RadarProductManager::NewDataAvailable, | ||||
|          this, | ||||
|          [&](common::RadarProductGroup             group, | ||||
|              const std::string&                    product, | ||||
|              std::chrono::system_clock::time_point latestTime) | ||||
|          [this](common::RadarProductGroup             group, | ||||
|                 const std::string&                    product, | ||||
|                 std::chrono::system_clock::time_point latestTime) | ||||
|          { | ||||
|             if (autoRefreshEnabled_ && | ||||
|                 context_->radar_product_group() == group && | ||||
|  | @ -817,23 +817,24 @@ void MapWidgetImpl::RadarProductManagerConnect() | |||
|                   std::make_shared<request::NexradFileRequest>(); | ||||
| 
 | ||||
|                // File request callback
 | ||||
|                connect(request.get(), | ||||
|                        &request::NexradFileRequest::RequestComplete, | ||||
|                        this, | ||||
|                        [&](std::shared_ptr<request::NexradFileRequest> request) | ||||
|                        { | ||||
|                           // Select loaded record
 | ||||
|                           auto record = request->radar_product_record(); | ||||
|                connect( | ||||
|                   request.get(), | ||||
|                   &request::NexradFileRequest::RequestComplete, | ||||
|                   this, | ||||
|                   [this](std::shared_ptr<request::NexradFileRequest> request) | ||||
|                   { | ||||
|                      // Select loaded record
 | ||||
|                      auto record = request->radar_product_record(); | ||||
| 
 | ||||
|                           if (record != nullptr) | ||||
|                           { | ||||
|                              widget_->SelectRadarProduct(record); | ||||
|                           } | ||||
|                        }); | ||||
|                      if (record != nullptr) | ||||
|                      { | ||||
|                         widget_->SelectRadarProduct(record); | ||||
|                      } | ||||
|                   }); | ||||
| 
 | ||||
|                // Load file
 | ||||
|                scwx::util::async( | ||||
|                   [=]() | ||||
|                   [=, this]() | ||||
|                   { | ||||
|                      if (group == common::RadarProductGroup::Level2) | ||||
|                      { | ||||
|  | @ -867,7 +868,7 @@ void MapWidgetImpl::InitializeNewRadarProductView( | |||
|    const std::string& colorPalette) | ||||
| { | ||||
|    scwx::util::async( | ||||
|       [=]() | ||||
|       [=, this]() | ||||
|       { | ||||
|          auto radarProductView = context_->radar_product_view(); | ||||
| 
 | ||||
|  | @ -903,13 +904,13 @@ void MapWidgetImpl::RadarProductViewConnect() | |||
|          radarProductView.get(), | ||||
|          &view::RadarProductView::ColorTableUpdated, | ||||
|          this, | ||||
|          [&]() { widget_->update(); }, | ||||
|          [this]() { widget_->update(); }, | ||||
|          Qt::QueuedConnection); | ||||
|       connect( | ||||
|          radarProductView.get(), | ||||
|          &view::RadarProductView::SweepComputed, | ||||
|          this, | ||||
|          [=]() | ||||
|          [=, this]() | ||||
|          { | ||||
|             std::shared_ptr<config::RadarSite> radarSite = | ||||
|                radarProductManager_->radar_site(); | ||||
|  |  | |||
|  | @ -149,11 +149,11 @@ void RadarProductLayer::Initialize() | |||
|    connect(radarProductView.get(), | ||||
|            &view::RadarProductView::ColorTableUpdated, | ||||
|            this, | ||||
|            [=]() { p->colorTableNeedsUpdate_ = true; }); | ||||
|            [this]() { p->colorTableNeedsUpdate_ = true; }); | ||||
|    connect(radarProductView.get(), | ||||
|            &view::RadarProductView::SweepComputed, | ||||
|            this, | ||||
|            [=]() { p->sweepNeedsUpdate_ = true; }); | ||||
|            [this]() { p->sweepNeedsUpdate_ = true; }); | ||||
| } | ||||
| 
 | ||||
| void RadarProductLayer::UpdateSweep() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat