[Insight-developers] Why is m_NumberOfThreads signed?

David Doria daviddoria at gmail.com
Mon May 16 08:41:39 EDT 2011


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


More information about the Insight-developers mailing list