On Thu, Aug 26, 2010 at 19:32, Octavian Voicu <octavian.vo...@gmail.com> wrote: > On Thu, Aug 26, 2010 at 8:11 PM, Juan Lang <juan.l...@gmail.com> wrote: >> Hi David, I know this was committed already, but something caught my >> eye that I didn't understand: >> >> + if(This->navpane.show ^ show_navpane) >> >> Is this a cute way to write if(This->navpane.show && show_navpane) ? >> If so, why ^ rather than &&? > > ^ is bitwise-XOR, so it is more like if(This->navpane.show != show_navpane), > which looks to be what he intended. > > Octavian >
It's indeed supposed to be !=, which also seems like the easier and better way of expressing it. :-) I guess the only reason I used ^ is that that was what came to my mind when I wrote the code in question. It shouldn't matter in practice, but I can include a patch for it in my next batch of patches.