Skip to content

Commit

Permalink
channels_blend(): bow to clang14 -Wbitwise-instead-of-logical overlords
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Jan 10, 2024
1 parent a2674d9 commit d0ae404
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lib/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -1358,9 +1358,7 @@ channels_blend(notcurses* nc, unsigned c1, unsigned c2, unsigned* blends,
}
}else if(ncchannel_default_p(c1) && ncchannel_default_p(c2)){
// do nothing, leave as default
// intentional bitwise AND on the first condition, to eliminate the
// dependency due to C's short-circuit evaluation
}else if((ncchannel_palindex_p(c1) & ncchannel_palindex_p(c2)) &&
}else if((ncchannel_palindex_p(c1) && ncchannel_palindex_p(c2)) &&
ncchannel_palindex(c1) == ncchannel_palindex(c2)){
// do nothing, leave as palette
}else{
Expand Down

0 comments on commit d0ae404

Please sign in to comment.