lilypond-devel
[Top][All Lists]
Advanced

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

Re: optimal-page-breaking.cc protect unsigned subtraction; issue 1553 (i


From: Keith OHara
Subject: Re: optimal-page-breaking.cc protect unsigned subtraction; issue 1553 (issue 22750045)
Date: Thu, 21 Nov 2013 20:28:32 -0800
User-agent: Opera Mail/12.16 (Win32)

On Thu, 21 Nov 2013 01:34:46 -0800, <address@hidden> wrote:

How about
if (min_sys_count > ideal_sys_count // subtraction wrapped around
    || min_sys_count <= 0)
   min_sys_count = 1;

Saves you the min thing.

That is compact, but I want to keep the min thing separate for code history.  
The two fixups of min_sys_count came from different people at different times.

This code is not run often enough that I worry about an extra test and branch.




reply via email to

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