On Mon, Aug 03, 2009 at 01:21:59PM +0200, Pavel Sanda wrote: > Vincent van Ravesteijn - TNW wrote: > > > > >> Modified: lyx-devel/trunk/src/Paragraph.cpp > > >> > > ======================================================================== > > ====== > > >> --- lyx-devel/trunk/src/Paragraph.cpp Sat Aug 1 23:49:26 2009 > > (r30820) > > >> +++ lyx-devel/trunk/src/Paragraph.cpp Sat Aug 1 23:54:13 2009 > > (r30821) > > >> @@ -2554,8 +2554,11 @@ > > >> if (isPrintable(c) || c == '\t' > > >> || (c == '\n' && options & AS_STR_NEWLINES)) > > >> os.put(c); > > >> - else if (c == META_INSET && options & AS_STR_INSETS) > > >> + else if (c == META_INSET && options & AS_STR_INSETS) { > > > > > >This is one of the few places where I think that 'useless' > > >parantheses improve readability. > > > > > >Andre' > > > > > > > Feel free to improve the readability. > > > > Maybe the condition should be a function with a clear function name such > > that it is immediately clear when os.put(c) is to be executed. Don't > > know whether we would like numerous extra small functions to improve > > readability (and increase compiling time, I guess). > > i thought the comment went on the different precendence of & and &&. > but its sometimes hard to guess from Andre's sparse coding... ;)
Yes, I meant && and &, i.e. c == META_INSET && (options & AS_STR_INSETS) in this case. For some reason I always have to look twice when there are bitwise operations in a boolean expression. Andre'