[Insight-developers] Why is m_NumberOfThreads signed?

Wes Turner wes.turner at kitware.com
Tue May 17 16:32:40 EDT 2011


You should be able to do it with sed from a batch file ... :-)

- Wes

On Tue, May 17, 2011 at 10:24 AM, Luis Ibanez <luis.ibanez at kitware.com>wrote:

> David,
>
> Maintenance is 80% of the cost of software development.
>
> The fact that in order to change the type used for
> representing "the number of threads", you have to go
> through a couple of hundred files, is an indication that
> early on we made the mistake of not introducing a type
> to represent this abstraction.
>
> If we have done our job right early on, your fix should
> have only required to modify *one* line of code.
>
> The painful fix of 64 bits integers that we did recently
> is an illustration of what happens when we use "implicit"
> abstractions, instead of taking advantage of simple
> mechanisms available in C++, such as a "typedef".
>
>
> I'll fix the patch,
>
>    When using Vim, there is no fear    :-)
>
>
>       Luis
>
>
> ----------------------------
> On Tue, May 17, 2011 at 7:31 AM, David Doria <daviddoria at gmail.com> wrote:
> > On Mon, May 16, 2011 at 9:48 PM, Luis Ibanez <luis.ibanez at kitware.com>
> > wrote:
> >>
> >> David
> >>
> >> May I humbly suggest that we use a typedef for it ?
> >>
> >> and then use that typedef in the proper places...
> >>
> >> It could be something like
> >>
> >>      typedef  unsigned int   ThreadIdType;
> >>
> >> up in itkIntTypes.h for example...
> >>
> >>
> >>     Luis
> >
> > I don't understand why? It should always be unsigned int, right?
> >
> > Also, it was quite a chore to go through all of those files and I'm not
> sure
> > I would like to do it again...
> >
> > David
> >
> _______________________________________________
> 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
>



-- 
Wesley D. Turner, Ph.D.
Kitware, Inc.
Technical Leader
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4920
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110517/dc30f28e/attachment.htm>


More information about the Insight-developers mailing list