mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 04:44:27 +02:00
fix: zero-initialization for a unit symbol buffer
This commit is contained in:
@@ -818,7 +818,7 @@ namespace detail {
|
|||||||
template<typename CharT, std::size_t N, unit_symbol_formatting fmt, Unit U>
|
template<typename CharT, std::size_t N, unit_symbol_formatting fmt, Unit U>
|
||||||
[[nodiscard]] consteval std::array<CharT, N> get_symbol_buffer(U)
|
[[nodiscard]] consteval std::array<CharT, N> get_symbol_buffer(U)
|
||||||
{
|
{
|
||||||
std::array<CharT, N> buffer;
|
std::array<CharT, N> buffer{};
|
||||||
unit_symbol_to<CharT>(buffer.begin(), U{}, fmt);
|
unit_symbol_to<CharT>(buffer.begin(), U{}, fmt);
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user