[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [PATCH] Fix headers display

From: Greg Chicares
Subject: Re: [lmi] [PATCH] Fix headers display
Date: Fri, 28 Aug 2015 15:22:52 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

On 2015-08-27 17:22, Vadim Zeitlin wrote:
>  Here is the trivial patch fixing this (also attached):

Committed 20150828T1520Z, revision 6271.

> +        if(i == s.end() || '\n' == *i)
> P.S. The condition in the "if" looks weird now but I really hope it could
>      be fixed by writing it as "i == s.end() || *i == '\n'" instead of
>      writing it as an even more unreadable "s.end() == i || ...". The use
>      such Yoda conditions really doesn't have any justification since about
>      20 years ago when all compilers implemented warnings for possibly
>      accidental assignments.

Equality comparisons from left to right you read? Hmmm.

When my age you reach, discard accustomed safeguards readily you will not.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]