AK: Zero-initialize the internal storage of Optional

This commit is contained in:
Andreas Kling 2020-02-24 10:22:27 +01:00
parent 0763f67043
commit 17846dd063

View file

@ -160,7 +160,7 @@ private:
ASSERT(m_has_value);
return *reinterpret_cast<const T*>(&m_storage);
}
char m_storage[sizeof(T)];
u8 m_storage[sizeof(T)] { 0 };
bool m_has_value { false };
};