mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:00:05 +00:00 
			
		
		
		
	Finish parsing Storm Position / Forecast page
This commit is contained in:
		
							parent
							
								
									0415223571
								
							
						
					
					
						commit
						925f91995a
					
				
					 4 changed files with 127 additions and 9 deletions
				
			
		|  | @ -88,6 +88,21 @@ std::string ToString(const std::vector<std::string>& v) | |||
|    return value; | ||||
| } | ||||
| 
 | ||||
| std::optional<float> TryParseFloat(const std::string& str) | ||||
| { | ||||
|    std::optional<float> value = std::nullopt; | ||||
| 
 | ||||
|    try | ||||
|    { | ||||
|       value = static_cast<float>(std::stof(str)); | ||||
|    } | ||||
|    catch (const std::exception&) | ||||
|    { | ||||
|    } | ||||
| 
 | ||||
|    return value; | ||||
| } | ||||
| 
 | ||||
| template<typename T> | ||||
| std::optional<T> TryParseUnsignedLong(const std::string& str) | ||||
| { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat