mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 06:30:05 +00:00 
			
		
		
		
	Automatically refresh placefiles that failed to load
This commit is contained in:
		
							parent
							
								
									d92f6c7204
								
							
						
					
					
						commit
						06a2a18c06
					
				
					 2 changed files with 48 additions and 4 deletions
				
			
		|  | @ -154,9 +154,17 @@ std::shared_ptr<Placefile::Font> Placefile::font(std::size_t i) | |||
| 
 | ||||
| std::shared_ptr<Placefile> Placefile::Load(const std::string& filename) | ||||
| { | ||||
|    std::shared_ptr<Placefile> placefile = nullptr; | ||||
| 
 | ||||
|    logger_->debug("Loading placefile: {}", filename); | ||||
|    std::ifstream f(filename, std::ios_base::in); | ||||
|    return Load(filename, f); | ||||
| 
 | ||||
|    if (f.is_open()) | ||||
|    { | ||||
|       placefile = Load(filename, f); | ||||
|    } | ||||
| 
 | ||||
|    return placefile; | ||||
| } | ||||
| 
 | ||||
| std::shared_ptr<Placefile> Placefile::Load(const std::string& name, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat