In this special case, because in binary each flag is its own bit:
Code:
CRMULTI_IGNORE_MULTIS = 0001
CRMULTI_IGNORE_OBJECTS = 0010
CRMULTI_IGNORE_WORLDZ = 0100
using a binary OR ( | ) or using normal addition ( + ) will result in the same value.
1 | 2 = 3
0001 | 0010 = 0011
-and-
1+2=3
0001 + 0010 = 0011
However, because these are flags, only the binary OR operation is acceptable, and addition can lead to errors. eg:
Code:
(CRMULTI_IGNORE_ALL + CRMULTI_IGNORE_MULTIS) != (CRMULTI_IGNORE_ALL | CRMULTI_IGNORE_MULTIS)
0111 + 0001 = 1000 (8)
0111 | 0001 = 0111 (7)
So, in short, when combining flags, ALWAYS ALWAYS use the OR operator, and not the addition operator.