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

View file

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