Michael Gerz <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes schrieb: | > [EMAIL PROTECTED] writes: | > | > | Author: schmitt | > | Date: Sun Jan 21 22:11:27 2007 | > | New Revision: 16798 | > | [snip] | > | --- lyx-devel/trunk/src/paragraph.C (original) | > | +++ lyx-devel/trunk/src/paragraph.C Sun Jan 21 22:11:27 2007 | > | @@ -561,7 +561,7 @@ | > | } | > | | | -int Paragraph::stripLeadingSpaces(bool trackChanges) | > | +bool Paragraph::stripLeadingSpaces(bool trackChanges) | > | { | > | if (isFreeSpacing()) | > | return 0; | > | @@ -576,7 +576,7 @@ | > | ++pos; | > | } | > | | - return count; | > | + return count + pos > 0; | > | } | > | > This doesn't look right does it? | > | > Too much counting on implict conversion for my taste. | > | Could you please explain? IMHO | | count + pos > 0 | | | gives a boolean, doesn't it?
Do you really call that obvious code? 5 + 1 converts to a boolean, not how I would write it though... And there is a "return 0" a couple of lines higher up... return count > 0 || pos > 0 would look a bit better. (count cannot be < 0 can it?) -- Lgb