mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 19:55:46 +00:00
common: Replace common_sizes into user-literals
Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc user-literals within literals.h. To keep the global namespace clean, users will have to use: ``` using namespace Common::Literals; ``` to access these literals.
This commit is contained in:
parent
dbf400b10c
commit
722f9c3cb5
19 changed files with 152 additions and 126 deletions
|
@ -5,11 +5,13 @@
|
|||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "common/host_memory.h"
|
||||
#include "common/literals.h"
|
||||
|
||||
using Common::HostMemory;
|
||||
using namespace Common::Literals;
|
||||
|
||||
static constexpr size_t VIRTUAL_SIZE = 1ULL << 39;
|
||||
static constexpr size_t BACKING_SIZE = 4ULL * 1024 * 1024 * 1024;
|
||||
static constexpr size_t BACKING_SIZE = 4_GiB;
|
||||
|
||||
TEST_CASE("HostMemory: Initialize and deinitialize", "[common]") {
|
||||
{ HostMemory mem(BACKING_SIZE, VIRTUAL_SIZE); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue