• anotherandrew@lemmy.mixdown.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 day ago

    Why not if (f & (F_1 | F_3)) {? I use this all the time in embedded code.

    edit: never mind; you’re checking for both flags. I’d probably use (f & (F_1 | F_3)) == (F_1 | F_3) but that’s not much different than what you wrote.