mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-29 11:00:29 +00:00
UE: Use AK's bit_cast and not reimplement it
This commit is contained in:
parent
c0c4e99c74
commit
58e373c0f2
Notes:
sideshowbarker
2024-07-18 20:38:30 +09:00
Author: https://github.com/Hendiadyoin1 Commit: https://github.com/SerenityOS/serenity/commit/58e373c0f29 Pull-request: https://github.com/SerenityOS/serenity/pull/6179 Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 9 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "SoftCPU.h"
|
||||
#include "Emulator.h"
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/BitCast.h>
|
||||
#include <AK/Debug.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
@ -57,15 +58,6 @@
|
|||
|
||||
namespace UserspaceEmulator {
|
||||
|
||||
template<class Dest, class Source>
|
||||
static inline Dest bit_cast(Source source)
|
||||
{
|
||||
static_assert(sizeof(Dest) == sizeof(Source));
|
||||
Dest dest;
|
||||
memcpy(&dest, &source, sizeof(dest));
|
||||
return dest;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
ALWAYS_INLINE void warn_if_uninitialized(T value_with_shadow, const char* message)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue