|
Blender V4.3
|
Go to the source code of this file.
Macros | |
| #define | BLI_STRUCT_DERIVED_UNEQUAL_OPERATOR(Type) |
| #define | BLI_STRUCT_EQUALITY_OPERATORS_1(Type, m) |
| #define | BLI_STRUCT_EQUALITY_OPERATORS_2(Type, m1, m2) |
| #define | BLI_STRUCT_EQUALITY_OPERATORS_3(Type, m1, m2, m3) |
| #define | BLI_STRUCT_EQUALITY_OPERATORS_4(Type, m1, m2, m3, m4) |
| #define | BLI_STRUCT_EQUALITY_OPERATORS_5(Type, m1, m2, m3, m4, m5) |
| #define BLI_STRUCT_DERIVED_UNEQUAL_OPERATOR | ( | Type | ) |
The macros below reduce the boilerplate needed to implement basic equality operators for structs. These macros could be removed starting with C++20, because then we can use defaulted comparison operators: https://en.cppreference.com/w/cpp/language/default_comparisons
Using these macros also reduces the probably for common typos, like comparing a value to itself or comparing the same value twice.
Definition at line 16 of file BLI_struct_equality_utils.hh.
| #define BLI_STRUCT_EQUALITY_OPERATORS_1 | ( | Type, | |
| m ) |
Definition at line 22 of file BLI_struct_equality_utils.hh.
| #define BLI_STRUCT_EQUALITY_OPERATORS_2 | ( | Type, | |
| m1, | |||
| m2 ) |
Definition at line 29 of file BLI_struct_equality_utils.hh.
Referenced by blender::nodes::ENUM_OPERATORS().
| #define BLI_STRUCT_EQUALITY_OPERATORS_3 | ( | Type, | |
| m1, | |||
| m2, | |||
| m3 ) |
Definition at line 36 of file BLI_struct_equality_utils.hh.
| #define BLI_STRUCT_EQUALITY_OPERATORS_4 | ( | Type, | |
| m1, | |||
| m2, | |||
| m3, | |||
| m4 ) |
Definition at line 43 of file BLI_struct_equality_utils.hh.
| #define BLI_STRUCT_EQUALITY_OPERATORS_5 | ( | Type, | |
| m1, | |||
| m2, | |||
| m3, | |||
| m4, | |||
| m5 ) |
Definition at line 50 of file BLI_struct_equality_utils.hh.