mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:50:06 +00:00 
			
		
		
		
	County display for alerts, alert cleanup
This commit is contained in:
		
							parent
							
								
									305e5c3698
								
							
						
					
					
						commit
						c87a77795d
					
				
					 5 changed files with 27 additions and 5 deletions
				
			
		|  | @ -25,11 +25,17 @@ static const auto        logger_    = scwx::util::Logger::Create(logPrefix_); | |||
| 
 | ||||
| static const std::string countyDatabaseFilename_ = ":/res/db/counties.db"; | ||||
| 
 | ||||
| static bool                                         initialized_ {false}; | ||||
| static std::unordered_map<std::string, std::string> countyMap_; | ||||
| static std::shared_mutex                            countyMutex_; | ||||
| 
 | ||||
| void CountyDatabase::Initialize() | ||||
| { | ||||
|    if (initialized_) | ||||
|    { | ||||
|       return; | ||||
|    } | ||||
| 
 | ||||
|    logger_->debug("Loading database"); | ||||
| 
 | ||||
|    // Generate UUID for temporary file
 | ||||
|  | @ -124,6 +130,8 @@ void CountyDatabase::Initialize() | |||
| 
 | ||||
|    // Remove temporary file
 | ||||
|    std::filesystem::remove(countyDatabaseCache); | ||||
| 
 | ||||
|    initialized_ = true; | ||||
| } | ||||
| 
 | ||||
| std::string GetCountyName(const std::string& id) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat