mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Move zero_size
This commit is contained in:
+7
-6
@@ -28,6 +28,13 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.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>
|
template <typename U, typename V>
|
||||||
gb_inline U bit_cast(V &v) { return reinterpret_cast<U &>(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
|
#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};
|
gb_global String global_module_path = {0};
|
||||||
|
|||||||
Reference in New Issue
Block a user