aboutsummaryrefslogtreecommitdiff
path: root/src/common.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-05-27 18:26:20 +0100
committergingerBill <bill@gingerbill.org>2020-05-27 18:26:20 +0100
commite84406a8951b631abe3ca7c8d6859703ed06e95f (patch)
treecf60f16132eb9dc48ea7e0cc904788bf5d80c1cb /src/common.cpp
parent1a0614b0d7f4b6010d79ac0a402d3c4c1f389529 (diff)
Move `zero_size`
Diffstat (limited to 'src/common.cpp')
-rw-r--r--src/common.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/common.cpp b/src/common.cpp
index 0f058d8f3..3b726dacd 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -28,6 +28,13 @@
#include <math.h>
#include <string.h>
+gb_inline void zero_size(void *ptr, isize len) {
+ memset(ptr, 0, len);
+}
+
+#define zero_item(ptr) zero_size((ptr), gb_size_of(ptr))
+
+
template <typename U, typename V>
gb_inline U bit_cast(V &v) { return reinterpret_cast<U &>(v); }
@@ -347,12 +354,6 @@ void mul_overflow_u64(u64 x, u64 y, u64 *lo, u64 *hi) {
#endif
}
-gb_inline void zero_size(void *ptr, isize len) {
- memset(ptr, 0, len);
-}
-
-#define zero_item(ptr) zero_size((ptr), gb_size_of(ptr))
-
gb_global String global_module_path = {0};