mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
LibX86: Use MakeUnsigned<T> from AK instead of making a custom one
This commit is contained in:
parent
bdc753ebd2
commit
3cdf4cd204
1 changed files with 1 additions and 21 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
|
@ -39,27 +40,6 @@ public:
|
|||
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>
|
||||
struct TypeTrivia {
|
||||
static const size_t bits = sizeof(T) * 8;
|
||||
|
|
Loading…
Add table
Reference in a new issue