Closed cnotin closed 5 years ago
Note that there are other XOR in lines below my patch. I wasn't sure of the intent (no comment/print) so I left them as-is. You might want to fix those also.
Yeah, I'm not a smart man. I'll merge this in.
Bitwise operations are tricky ;) I let you check other cases (lines below) that might have the same problem: I wasn't sure of the intent so I left them.
The binary operator used is incorrect. The intent is to remove the listed collection methods from
resolved
but by using the XOR^
operator it instead adds these methods (if not already present). Proof:We see here that several non-computer collection methods were added instead of removed.
The patch replaces XOR by NAND
& ~
operator. After the patch:Just to be sure that the removal works well, we can try by specifying
all
methods:More info: https://en.wikipedia.org/wiki/Bit_manipulation#Bit_manipulation_in_the_C_programming_language XOR allows to toggle a bit, but NAND should be used to clear it.