mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-28 13:43:45 +03:00
LibX86: Use MakeUnsigned<T> from AK instead of making a custom one
This commit is contained in:
parent
bdc753ebd2
commit
3cdf4cd204
Notes:
sideshowbarker
2024-07-19 07:34:26 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/3cdf4cd2041
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <AK/StdLibExtras.h>
|
||||||
#include <AK/String.h>
|
#include <AK/String.h>
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
|
|
||||||
@ -39,27 +40,6 @@ public:
|
|||||||
virtual String symbolicate(FlatPtr, u32* offset = nullptr) const = 0;
|
virtual String symbolicate(FlatPtr, u32* offset = nullptr) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
struct MakeUnsigned {
|
|
||||||
typedef T type;
|
|
||||||
};
|
|
||||||
template<>
|
|
||||||
struct MakeUnsigned<i8> {
|
|
||||||
typedef u8 type;
|
|
||||||
};
|
|
||||||
template<>
|
|
||||||
struct MakeUnsigned<i16> {
|
|
||||||
typedef u32 type;
|
|
||||||
};
|
|
||||||
template<>
|
|
||||||
struct MakeUnsigned<i32> {
|
|
||||||
typedef u32 type;
|
|
||||||
};
|
|
||||||
template<>
|
|
||||||
struct MakeUnsigned<i64> {
|
|
||||||
typedef u64 type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct TypeTrivia {
|
struct TypeTrivia {
|
||||||
static const size_t bits = sizeof(T) * 8;
|
static const size_t bits = sizeof(T) * 8;
|
||||||
|
Loading…
Reference in New Issue
Block a user