>> 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).


P.S I'm always struggling with these kind of if-statements, I'm starting
to get confused with the general rule:

if (bla == bla2
    && bla3 == bla4)
    do_something;

Or 

if (bla == bla2
      && bla3 == bla4)
    do_something;

Or

if (bla == bla2
    && bla3 == bla4)
      do_something;

Or

if (bla == bla2
    && bla3 == bla4) {
    do_something;
}

Or 

Bool do_we_have_to_do_something_1 = bla == bla2;
Bool do_we_have_to_do_something_2 = bla3 == bla4;
If (do_we_have_to_do_something_1 && do_we_have_to_do_something_2)
    do_something;


Vincent

Reply via email to