mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:47:45 +00: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
|
#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…
Add table
Add a link
Reference in a new issue