How about WI_AreAnyOtherFlagsSet?
bradlitterell opened this issue · comments
Brad Litterell commented
A common usage pattern is something like this:
// make sure only the valid flags are set
RETURN_HR_IF(<someError>, WI_IsAnyFlagSet(dwFlags, ~(FLAG1 | FLAG2 | FLAG3));
I think this would be clearer if it read thus:
RETURN_HR_IF(<someError>, WI_AreAnyOtherFlagsSet(dwFlags, FLAG1 | FLAG2 | FLAG3);
It states the direct condition of the "IF" without hiding the negation as a small character in the middle of the line.
If I created a PR to add this variant, would the project support it?
Jon Wiswall commented
Sure thing, send the PR along. Contributing instructions are in the readme.
Thank you!