start doing wraps and subprojects

This commit is contained in:
Mars 2025-02-20 14:49:18 -05:00
parent ea13e2fc57
commit 24416c338c
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
11013 changed files with 3703981 additions and 25 deletions

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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 {