mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
settings_setting: Fix errors
ToString didn't have a constexpr if statement where needed. Canonicalize missed an else, causing unreachable code error on MSVC.
This commit is contained in:
parent
04d4b6ab80
commit
4903f40efe
1 changed files with 3 additions and 2 deletions
|
@ -142,7 +142,7 @@ protected:
|
||||||
return value_.has_value() ? std::to_string(*value_) : "none";
|
return value_.has_value() ? std::to_string(*value_) : "none";
|
||||||
} else if constexpr (std::is_same<Type, bool>()) {
|
} else if constexpr (std::is_same<Type, bool>()) {
|
||||||
return value_ ? "true" : "false";
|
return value_ ? "true" : "false";
|
||||||
} else if (std::is_same<Type, AudioEngine>()) {
|
} else if constexpr (std::is_same<Type, AudioEngine>()) {
|
||||||
return CanonicalizeEnum(value_);
|
return CanonicalizeEnum(value_);
|
||||||
} else {
|
} else {
|
||||||
return std::to_string(static_cast<u64>(value_));
|
return std::to_string(static_cast<u64>(value_));
|
||||||
|
@ -222,8 +222,9 @@ public:
|
||||||
[[nodiscard]] std::string constexpr Canonicalize() const override {
|
[[nodiscard]] std::string constexpr Canonicalize() const override {
|
||||||
if constexpr (std::is_enum<Type>::value) {
|
if constexpr (std::is_enum<Type>::value) {
|
||||||
return CanonicalizeEnum(this->GetValue());
|
return CanonicalizeEnum(this->GetValue());
|
||||||
|
} else {
|
||||||
|
return ToString(this->GetValue());
|
||||||
}
|
}
|
||||||
return ToString(this->GetValue());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue