start doing wraps and subprojects
This commit is contained in:
parent
ea13e2fc57
commit
24416c338c
11013 changed files with 3703981 additions and 25 deletions
|
@ -35,7 +35,7 @@ fn Config::getInstance() -> Config {
|
|||
const Result<Config> result = rfl::toml::load<Config>(configPath.string());
|
||||
|
||||
if (!result) {
|
||||
ERROR_LOG("Failed to load config file: {}", result.error()->what());
|
||||
ERROR_LOG("Failed to load config file: {}", result.error().what());
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace {
|
|||
|
||||
rfl::Result<WeatherOutput> result = rfl::json::read<WeatherOutput>(content);
|
||||
if (!result)
|
||||
return std::unexpected(result.error()->what());
|
||||
return std::unexpected(result.error().what());
|
||||
|
||||
DEBUG_LOG("Successfully read from cache file.");
|
||||
return *result;
|
||||
|
@ -115,9 +115,11 @@ namespace {
|
|||
|
||||
DEBUG_LOG("API response size: {}", responseBuffer.size());
|
||||
|
||||
DEBUG_LOG("API response: {}", responseBuffer);
|
||||
|
||||
rfl::Result<WeatherOutput> output = rfl::json::read<WeatherOutput>(responseBuffer);
|
||||
if (!output)
|
||||
return std::unexpected(output.error()->what());
|
||||
return std::unexpected(output.error().what());
|
||||
|
||||
return *output;
|
||||
}
|
||||
|
|
|
@ -33,8 +33,8 @@ struct Wind {
|
|||
};
|
||||
|
||||
struct Precipitation {
|
||||
rfl::Rename<"1h", f64> one_hour;
|
||||
rfl::Rename<"3h", f64> three_hours;
|
||||
rfl::Rename<"1h", std::optional<f64>> one_hour;
|
||||
rfl::Rename<"3h", std::optional<f64>> three_hours;
|
||||
};
|
||||
|
||||
struct Sys {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue