This commit is contained in:
Mars 2024-06-14 00:48:32 -04:00
parent 60d4160033
commit 138191227f
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
2 changed files with 5 additions and 5 deletions

View file

@ -58,7 +58,7 @@ fn NowPlayingImpl::from_class(
} }
//clang-format on //clang-format on
fn NowPlayingImpl::to_class() const -> NowPlaying { return {enabled}; } fn NowPlayingImpl::to_class() const -> NowPlaying { return {enabled.value_or(false)}; }
fn ConfigImpl::from_class(const Config& config) noexcept -> ConfigImpl { fn ConfigImpl::from_class(const Config& config) noexcept -> ConfigImpl {
return { return {

View file

@ -61,20 +61,20 @@ class Weather {
struct WeatherOutput { struct WeatherOutput {
Clouds clouds; Clouds clouds;
Main main;
Sys sys;
Wind wind;
isize timezone; isize timezone;
isize visibility; isize visibility;
Main main;
rfl::Rename<"coord", Coords> coords; rfl::Rename<"coord", Coords> coords;
std::optional<Precipitation> rain; std::optional<Precipitation> rain;
std::optional<Precipitation> snow; std::optional<Precipitation> snow;
std::string base; std::string base;
std::string name; std::string name;
std::vector<Condition> weather; std::vector<Condition> weather;
Sys sys;
usize cod; usize cod;
usize dt; usize dt;
usize id; usize id;
Wind wind;
}; };
using Location = std::variant<std::string, Coords>; using Location = std::variant<std::string, Coords>;
@ -132,7 +132,7 @@ class NowPlaying {
}; };
struct NowPlayingImpl { struct NowPlayingImpl {
bool enabled; std::optional<bool> enabled;
static fn from_class(const NowPlaying& now_playing static fn from_class(const NowPlaying& now_playing
) noexcept -> NowPlayingImpl; ) noexcept -> NowPlayingImpl;