Changed equal_fn to return 'true' on equality

Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
2024-10-13 16:43:04 +03:00
parent df24bf2940
commit daf5914a51
2 changed files with 3 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ typedef struct {
#define DEFINE_EQUAL_FUNCTION(T,name) static inline bool EQUAL_FUNCTION(T,name)(T *self, T *other)
// NOTE: This shouldn't be used for non-arithmetic types.
#define DEFINE_DEFAULT_EQUAL_FUNCTION(T) \
DEFINE_EQUAL_FUNCTION(T,DEFAULT) { return memcmp(self, other, sizeof(T)); }
DEFINE_EQUAL_FUNCTION(T,DEFAULT) { return memcmp(self, other, sizeof(T)) == 0; }
#define DEFINE_TOSTR_FUNCTION(T,name) static inline void TOSTR_FUNCTION(T,name)(T *self, char* out)
#define DEFINE_DEFAULT_TOSTR_FUNCTION(T) \