BAN: Default initialize optional storage

This removes maybe uninitialized warning when using default initialized
optionals.
This commit is contained in:
Bananymous 2024-07-16 11:19:16 +03:00
parent 1337758660
commit fd8dc03ae9
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ namespace BAN
constexpr void clear();
private:
alignas(T) uint8_t m_storage[sizeof(T)];
alignas(T) uint8_t m_storage[sizeof(T)] {};
bool m_has_value { false };
};