weh
This commit is contained in:
parent
11096c5ec7
commit
1926ef4a92
4 changed files with 30 additions and 18 deletions
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include "util/result.h"
|
||||
|
||||
using WeatherOutput = Weather::WeatherOutput;
|
||||
|
||||
DEFINE_GETTER(Weather, const Weather::Location, Location)
|
||||
DEFINE_GETTER(Weather, const std::string, ApiKey)
|
||||
DEFINE_GETTER(Weather, const std::string, Units)
|
||||
|
@ -24,8 +26,6 @@ fn WeatherImpl::from_class(const Weather& weather) noexcept -> WeatherImpl {
|
|||
|
||||
fn WeatherImpl::to_class() const -> Weather { return { location, api_key, units }; }
|
||||
|
||||
using WeatherOutput = Weather::WeatherOutput;
|
||||
|
||||
// Function to read cache from file
|
||||
fn ReadCacheFromFile() -> Result<WeatherOutput> {
|
||||
std::ifstream ifs("/tmp/weather_cache.json");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue