From 58e373c0f294d06f6a5fe7417b3a2a134b2cc940 Mon Sep 17 00:00:00 2001 From: Hendiadyoin1 Date: Wed, 7 Apr 2021 20:23:38 +0200 Subject: [PATCH] UE: Use AK's bit_cast and not reimplement it --- Userland/DevTools/UserspaceEmulator/SoftCPU.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Userland/DevTools/UserspaceEmulator/SoftCPU.cpp b/Userland/DevTools/UserspaceEmulator/SoftCPU.cpp index bf73af564bc..97519ea5005 100644 --- a/Userland/DevTools/UserspaceEmulator/SoftCPU.cpp +++ b/Userland/DevTools/UserspaceEmulator/SoftCPU.cpp @@ -27,6 +27,7 @@ #include "SoftCPU.h" #include "Emulator.h" #include +#include #include #include #include @@ -57,15 +58,6 @@ namespace UserspaceEmulator { -template -static inline Dest bit_cast(Source source) -{ - static_assert(sizeof(Dest) == sizeof(Source)); - Dest dest; - memcpy(&dest, &source, sizeof(dest)); - return dest; -} - template ALWAYS_INLINE void warn_if_uninitialized(T value_with_shadow, const char* message) {