added INITSTRUCT to zero-out data

This commit is contained in:
2020-08-22 19:26:18 -05:00
parent 94b0dc724e
commit 88953541ef
9 changed files with 44 additions and 41 deletions

View File

@@ -25,6 +25,10 @@
#include <locale>
#include <codecvt>
// yes this is ugly, but this is needed to zero out the memory so we don't have random stackdata in our structs.
#define INITSTRUCT(T, x) T x; \
memset(&x, 0, sizeof(T));
// TODO: rewrite U16toU8 & U8toU16 to not use codecvt
std::string U16toU8(char16_t* src);