aboutsummaryrefslogtreecommitdiff
path: root/src/common.hh
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-07-01 07:21:10 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-07-01 07:21:10 -0300
commit6243967f1fac3af8ed3e72790cabed0f79978bdb (patch)
tree35f0d27b4c280622c368a9fa94815b8deb7a990f /src/common.hh
parent6c8aa85b8b578db03a8c5f0dc0b7e80605592d45 (diff)
downloadgame-6243967f1fac3af8ed3e72790cabed0f79978bdb.tar.gz
game-6243967f1fac3af8ed3e72790cabed0f79978bdb.zip
fix `operator=` for `TChannel`, `TParty`, and `THouse`
I had focused on copying the `vector` fields for theses structs but, being the copy operator, you need to copy everything over.
Diffstat (limited to 'src/common.hh')
-rw-r--r--src/common.hh12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/common.hh b/src/common.hh
index 8aef0fd..57c7745 100644
--- a/src/common.hh
+++ b/src/common.hh
@@ -29,12 +29,6 @@ typedef size_t usize;
#define MB(x) ((usize)(x) << 20)
#define GB(x) ((usize)(x) << 30)
-// TODO(fusion): We might not actually compile the output for the decompilation
-// step but if we did, we'd need to make sure we're compiling in 32 bits mode.
-STATIC_ASSERT(sizeof(bool) == 1);
-STATIC_ASSERT(sizeof(int) == 4);
-//STATIC_ASSERT(sizeof(void*) == 4);
-
#if !OS_WINDOWS && !OS_LINUX
# if defined(_WIN32)
# define OS_WINDOWS 1
@@ -55,7 +49,6 @@ STATIC_ASSERT(sizeof(int) == 4);
# endif
#endif
-// NOTE(fusion): Compiler attributes.
#if COMPILER_GCC || COMPILER_CLANG
# define ATTR_FALLTHROUGH __attribute__((fallthrough))
# define ATTR_PRINTF(x, y) __attribute__((format(printf, x, y)))
@@ -83,8 +76,11 @@ STATIC_ASSERT(sizeof(int) == 4);
// original code but only for reference. Making it compile on Windows shouldn't
// be too difficult either. Overall this design is outdated and should be reviewed.
// Nevertheless, we should focus on getting it working as intended, on the target
-// platform (which is Linux 32-bits) before attempting to refine it.
+// platform (which is Linux 32-bit) before attempting to refine it.
STATIC_ASSERT(OS_LINUX);
+STATIC_ASSERT(sizeof(bool) == 1);
+STATIC_ASSERT(sizeof(int) == 4);
+//STATIC_ASSERT(sizeof(void*) == 4);
#include <errno.h>
#include <unistd.h>