Compare commits

...

2 Commits

Author SHA1 Message Date
4cc226b57a enabled more warnings 2025-11-09 18:37:18 +05:00
cf5fda7a1e added macro List_castTo_Array 2025-11-09 18:05:44 +05:00
3 changed files with 12 additions and 3 deletions

View File

@ -28,3 +28,4 @@ void List_push_size(List_* ptr, void* values, u32 size);
bool List_removeAt_size(List_* ptr, u32 i, u32 remove_size);
#define List_len(L, T) ((L)->size / sizeof(T))
#define List_castTo_Array(l) Array_construct_size(l.data, l.size)

View File

@ -22,7 +22,6 @@ typedef int64_t i64;
typedef uint64_t u64;
typedef float f32;
typedef double f64;
typedef void* ptr;
#if !__cplusplus && !defined(bool)
typedef u8 bool;

View File

@ -6,8 +6,17 @@ CMP_C="gcc"
CMP_CPP="g++"
STD_C="c99"
STD_CPP="c++11"
WARN_C="-Wall -Wextra -Werror=return-type -Werror=pointer-arith"
WARN_CPP="-Wall -Wextra -Werror=return-type -Werror=pointer-arith"
WARN_C="-Wall -Wextra
-Wduplicated-branches
-Wduplicated-cond
-Wformat=2
-Wmissing-include-dirs
-Wshadow
-Werror=return-type
-Werror=pointer-arith
-Werror=init-self
-Werror=incompatible-pointer-types"
WARN_CPP="$WARN_C"
SRC_C="$(find src -name '*.c')"
SRC_CPP="$(find src -name '*.cpp')"