aboutsummaryrefslogtreecommitdiff
path: root/src/basic/defs.hpp
diff options
context:
space:
mode:
authorfschildt <florian.schildt@protonmail.com>2025-07-21 16:07:28 +0200
committerfschildt <florian.schildt@protonmail.com>2025-07-21 16:07:28 +0200
commitb46a0d9369fbaa1938f0968ab216bc2d564a9c37 (patch)
treec28b75187d01be9642af56a54a6101f51b25e4a7 /src/basic/defs.hpp
first commitHEADmaster
Diffstat (limited to 'src/basic/defs.hpp')
-rw-r--r--src/basic/defs.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/basic/defs.hpp b/src/basic/defs.hpp
new file mode 100644
index 0000000..bfd302e
--- /dev/null
+++ b/src/basic/defs.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <cassert>
+#include <cstdint>
+#include <cstddef>
+
+#define ARRAY_COUNT(x) (sizeof(x) / sizeof(x[0]))
+
+#define InvalidDefaultCase assert(0)
+
+#define KIBIBYTES(x) ((x)*1024)
+#define MEBIBYTES(x) ((x)*KIBIBYTES(1024))
+#define GIBIBYTES(x) ((x)*MEBIBYTES(1024))
+