diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-24 10:22:27 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-24 10:22:27 +0100 |
commit | 17846dd06396c196ea200386031875a26dbc16b3 (patch) | |
tree | 3f121c810d333d04e65574131f515f75ee6e6d43 /AK/Optional.h | |
parent | 0763f670435f30087d285077bf24bfbef9f76b11 (diff) | |
download | serenity-17846dd06396c196ea200386031875a26dbc16b3.zip |
AK: Zero-initialize the internal storage of Optional
Diffstat (limited to 'AK/Optional.h')
-rw-r--r-- | AK/Optional.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/Optional.h b/AK/Optional.h index 4c27ea545d..80986dca78 100644 --- a/AK/Optional.h +++ b/AK/Optional.h @@ -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 }; }; |