[Insight-developers] Why is m_NumberOfThreads signed?
Bill Lorensen
bill.lorensen at gmail.com
Mon May 16 09:17:01 EDT 2011
I agree with Brad. Also, in customers' applications, they have been using
int and they will have to change their code. Further it will be difficult to
build an application against both ITK3 and ITK4 without #ifdef's. For
example, Slicer4 currently builds against ITK3 and ITK4.
It seems the benefit ("it makes more sense") is small compared to the
possible impact on our customers.
Bill
On Mon, May 16, 2011 at 9:04 AM, Bradley Lowekamp <blowekamp at mail.nih.gov>wrote:
> 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
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110516/51d09389/attachment.htm>
More information about the Insight-developers
mailing list