mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 21:00:05 +00:00 
			
		
		
		
	Clang tidy/format fixes for color_palette_fallback_warning
This commit is contained in:
		
							parent
							
								
									8be9cc72de
								
							
						
					
					
						commit
						dc3258d149
					
				
					 1 changed files with 37 additions and 44 deletions
				
			
		|  | @ -1865,20 +1865,18 @@ void MapWidgetImpl::RadarProductManagerDisconnect() | ||||||
| void MapWidgetImpl::InitializeNewRadarProductView( | void MapWidgetImpl::InitializeNewRadarProductView( | ||||||
|    const std::string& colorPalette) |    const std::string& colorPalette) | ||||||
| { | { | ||||||
|    boost::asio::post(threadPool_, |    boost::asio::post( | ||||||
|  |       threadPool_, | ||||||
|       [colorPalette, this]() |       [colorPalette, this]() | ||||||
|       { |       { | ||||||
|          try |          try | ||||||
|          { |          { | ||||||
|                            auto radarProductView = |             auto radarProductView = context_->radar_product_view(); | ||||||
|                               context_->radar_product_view(); |  | ||||||
| 
 | 
 | ||||||
|             auto& paletteSetting = |             auto& paletteSetting = | ||||||
|                               settings::PaletteSettings::Instance().palette( |                settings::PaletteSettings::Instance().palette(colorPalette); | ||||||
|                                  colorPalette); |  | ||||||
| 
 | 
 | ||||||
|                            std::string colorTableFile = |             std::string colorTableFile = paletteSetting.GetValue(); | ||||||
|                               paletteSetting.GetValue(); |  | ||||||
|             if (colorTableFile.empty()) |             if (colorTableFile.empty()) | ||||||
|             { |             { | ||||||
|                colorTableFile = paletteSetting.GetDefault(); |                colorTableFile = paletteSetting.GetDefault(); | ||||||
|  | @ -1888,22 +1886,17 @@ void MapWidgetImpl::InitializeNewRadarProductView( | ||||||
|                util::OpenFile(colorTableFile); |                util::OpenFile(colorTableFile); | ||||||
|             if (colorTableStream->fail()) |             if (colorTableStream->fail()) | ||||||
|             { |             { | ||||||
|                               logger_->warn("Could not open color table {}", |                logger_->warn("Could not open color table {}", colorTableFile); | ||||||
|                                             colorTableFile); |                colorTableStream = util::OpenFile(paletteSetting.GetDefault()); | ||||||
|                               colorTableStream = |  | ||||||
|                                  util::OpenFile(paletteSetting.GetDefault()); |  | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             std::shared_ptr<common::ColorTable> colorTable = |             std::shared_ptr<common::ColorTable> colorTable = | ||||||
|                common::ColorTable::Load(*colorTableStream); |                common::ColorTable::Load(*colorTableStream); | ||||||
|             if (!colorTable->IsValid()) |             if (!colorTable->IsValid()) | ||||||
|             { |             { | ||||||
|                               logger_->warn("Could not load color table {}", |                logger_->warn("Could not load color table {}", colorTableFile); | ||||||
|                                             colorTableFile); |                colorTableStream = util::OpenFile(paletteSetting.GetDefault()); | ||||||
|                               colorTableStream = |                colorTable       = common::ColorTable::Load(*colorTableStream); | ||||||
|                                  util::OpenFile(paletteSetting.GetDefault()); |  | ||||||
|                               colorTable = |  | ||||||
|                                  common::ColorTable::Load(*colorTableStream); |  | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             radarProductView->LoadColorTable(colorTable); |             radarProductView->LoadColorTable(colorTable); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak