[Insight-developers] Why is m_NumberOfThreads signed?
    Bradley Lowekamp 
    blowekamp at mail.nih.gov
       
    Mon May 16 09:04:47 EDT 2011
    
    
  
But then all the people who just used int, would get a warning. I don't see an advantage.
On May 16, 2011, at 8:41 AM, David Doria wrote:
> On Mon, May 16, 2011 at 8:38 AM, Bradley Lowekamp
> <blowekamp at mail.nih.gov> wrote:
>> What is the motivation for changing this? Why is unsigned better the signed?
> 
> It came to my attention because I would do something like:
> 
> for(unsigned int i = 0; i < this->m_NumberOfThreads; ++i)
> 
> and get warnings about unsigned/signed comparisons.
> 
> Also, it just seems more "correct", as it doesn't make sense for the
> number of threads to be negative.
> 
> David
========================================================
Bradley Lowekamp  
Lockheed Martin Contractor for
Office of High Performance Computing and Communications
National Library of Medicine 
blowekamp at mail.nih.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110516/56d5016c/attachment.htm>
    
    
More information about the Insight-developers
mailing list