mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-07 19:41:38 +12:00
Start adding memory stuff
This commit is contained in:
parent
2057e0c447
commit
905c7ed770
8 changed files with 77 additions and 10 deletions
|
@ -17,8 +17,7 @@ using s16 = std::int16_t;
|
|||
using s32 = std::int32_t;
|
||||
using s64 = std::int64_t;
|
||||
|
||||
class Helpers {
|
||||
public:
|
||||
namespace Helpers {
|
||||
[[noreturn]] static void panic(const char* fmt, ...) {
|
||||
std::va_list args;
|
||||
va_start(args, fmt);
|
||||
|
@ -133,6 +132,19 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
// UDLs for memory size values
|
||||
constexpr size_t operator""_KB(unsigned long long int x) {
|
||||
return 1024ULL * x;
|
||||
}
|
||||
|
||||
constexpr size_t operator""_MB(unsigned long long int x) {
|
||||
return 1024_KB * x;
|
||||
}
|
||||
|
||||
constexpr size_t operator""_GB(unsigned long long int x) {
|
||||
return 1024_MB * x;
|
||||
}
|
||||
|
||||
// useful macros
|
||||
// likely/unlikely
|
||||
#ifdef __GNUC__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue