[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haiku-commits
Subject:    [haiku-commits] Re: r40726 - haiku/trunk/src/kits/support
From:       Ingo Weinhold <ingo_weinhold () gmx ! de>
Date:       2011-02-28 15:28:09
Message-ID: 20110228162809.415.2 () knochen-vm ! localdomain
[Download RAW message or body]


On 2011-02-28 at 10:42:34 [+0100], Oliver Tappe <zooey@hirschkaefer.de> 
wrote:
> 
> On 2011-02-28 at 03:41:08 [+0100], Jonas Sundström <jonas@kirilla.com> 
> wrote:
> [ ... ]
> > I think               bytes = bytes < 0 ? 0 : bytes;
> > is more clear than    bytes = min_clamp0(bytes, bytes);

Even clearer (though two lines):

	if (bytes < 0)
		bytes = 0;

Other than that there's always the std::max() function that can be used 
instead of hand-coding an instance of it.

CU, Ingo


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic