 |
Blender V4.3
|
Go to the documentation of this file.
16#define BLI_STRUCT_DERIVED_UNEQUAL_OPERATOR(Type) \
17 friend bool operator!=(const Type &a, const Type &b) \
22#define BLI_STRUCT_EQUALITY_OPERATORS_1(Type, m) \
23 friend bool operator==(const Type &a, const Type &b) \
27 BLI_STRUCT_DERIVED_UNEQUAL_OPERATOR(Type)
29#define BLI_STRUCT_EQUALITY_OPERATORS_2(Type, m1, m2) \
30 friend bool operator==(const Type &a, const Type &b) \
32 return a.m1 == b.m1 && a.m2 == b.m2; \
34 BLI_STRUCT_DERIVED_UNEQUAL_OPERATOR(Type)
36#define BLI_STRUCT_EQUALITY_OPERATORS_3(Type, m1, m2, m3) \
37 friend bool operator==(const Type &a, const Type &b) \
39 return a.m1 == b.m1 && a.m2 == b.m2 && a.m3 == b.m3; \
41 BLI_STRUCT_DERIVED_UNEQUAL_OPERATOR(Type)
43#define BLI_STRUCT_EQUALITY_OPERATORS_4(Type, m1, m2, m3, m4) \
44 friend bool operator==(const Type &a, const Type &b) \
46 return a.m1 == b.m1 && a.m2 == b.m2 && a.m3 == b.m3 && a.m4 == b.m4; \
48 BLI_STRUCT_DERIVED_UNEQUAL_OPERATOR(Type)
50#define BLI_STRUCT_EQUALITY_OPERATORS_5(Type, m1, m2, m3, m4, m5) \
51 friend bool operator==(const Type &a, const Type &b) \
53 return a.m1 == b.m1 && a.m2 == b.m2 && a.m3 == b.m3 && a.m4 == b.m4 && a.m5 == b.m5; \
55 BLI_STRUCT_DERIVED_UNEQUAL_OPERATOR(Type)