diff options
author | Andreas Kling <kling@serenityos.org> | 2020-03-08 11:57:24 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-08 13:06:51 +0100 |
commit | 35d88f536c4082f7fb6d740973d3cbb79ba74a5e (patch) | |
tree | bc4ee54be6f46d05aa8b621ec1da9d0cb19a582e /AK/Optional.h | |
parent | b1058b33fb32cb398d1723eb6fe59c27dc7967cc (diff) | |
download | serenity-35d88f536c4082f7fb6d740973d3cbb79ba74a5e.zip |
AK: Use __builtin_memset() and such to reduce header dependencies
We can use __builtin_memset() without including <string.h>.
This is pretty neat, as it will allow us to reduce the header deps
of AK templates a bit, if applied consistently.
Note that this is an enabling change for an upcoming #include removal.
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 c135440013..7686bfdd5d 100644 --- a/AK/Optional.h +++ b/AK/Optional.h @@ -157,7 +157,7 @@ private: ASSERT(m_has_value); return *reinterpret_cast<const T*>(&m_storage); } - u8 m_storage[sizeof(T)] { 0 }; + unsigned char m_storage[sizeof(T)] { 0 }; bool m_has_value { false }; }; |