http://d.puremagic.com/issues/show_bug.cgi?id=6531


drug007 <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]


--- Comment #6 from drug007 <[email protected]> 2013-04-11 07:13:10 PDT ---
I propose the following:

    auto pastEnd = start + count * step;
    if (step > 0)
    {
        if (pastEnd < end) {
            ++count;
            pastEnd = start + count * step;
        }
        assert(pastEnd >= end);
    }
    else
    {
        if (pastEnd > end) {
            ++count;
            pastEnd = start + count * step;
        }
        assert(pastEnd <= end);
    }

Martin Nowak's fix is the better (simpler and more clear) but I just don't like
cast.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to