Fix some warnings

This commit is contained in:
Megamouse 2026-04-30 17:08:01 +02:00
parent 66d2bc3dd5
commit a8dd053593
14 changed files with 13 additions and 24 deletions

View file

@ -253,10 +253,6 @@ bool try_to_float(f64* out, std::string_view value, f64 min, f64 max, std::strin
bool try_to_string(std::string* out, f64 value, std::string_view name)
{
#ifdef __APPLE__
if (out) *out = std::to_string(value);
return true;
#else
std::array<char, 32> str{};
if (auto [ptr, ec] = std::to_chars(str.data(), str.data() + str.size(), value, std::chars_format::fixed); ec == std::errc())
@ -269,7 +265,6 @@ bool try_to_string(std::string* out, f64 value, std::string_view name)
if (out) cfg_log.error("cfg::try_to_string('%s'): could not convert value '%f' to string. error='%s'", name, value, std::make_error_code(ec).message());
return false;
}
#endif
}
bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) func, std::string_view value, std::string_view name)