summaryrefslogtreecommitdiff
path: root/AK/Optional.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-03-08 12:34:33 +0100
committerAndreas Kling <kling@serenityos.org>2020-03-08 13:06:51 +0100
commit900f51ccd0832caf8405620e74e14a17deea75c4 (patch)
treefd2a4a4023293728c8d56c226885d5448e093740 /AK/Optional.h
parentfa9fba69018dd7055794b9dfab81c7b89e98b279 (diff)
downloadserenity-900f51ccd0832caf8405620e74e14a17deea75c4.zip
AK: Move memory stuff (fast memcpy, etc) to a separate header
Move the "fast memcpy" stuff out of StdLibExtras.h and into Memory.h. This will break a ton of things that were relying on StdLibExtras.h to include a bunch of other headers. Fix will follow immediately after. This makes it possible to include StdLibExtras.h from Types.h, which is the main point of this exercise.
Diffstat (limited to 'AK/Optional.h')
-rw-r--r--AK/Optional.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/AK/Optional.h b/AK/Optional.h
index 7686bfdd5d..e14f4ecf49 100644
--- a/AK/Optional.h
+++ b/AK/Optional.h
@@ -29,6 +29,7 @@
#include <AK/Assertions.h>
#include <AK/Platform.h>
#include <AK/StdLibExtras.h>
+#include <AK/Types.h>
namespace AK {
@@ -157,7 +158,7 @@ private:
ASSERT(m_has_value);
return *reinterpret_cast<const T*>(&m_storage);
}
- unsigned char m_storage[sizeof(T)] { 0 };
+ u8 m_storage[sizeof(T)] { 0 };
bool m_has_value { false };
};