[Insight-developers] Style question -- is &* as confusing to everyone else as it is to me?

Jean-Christophe Fillion-Robin jchris.fillionr at kitware.com
Thu Jun 30 12:16:00 EDT 2011


+1

2011/6/30 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>

>
> Le 30 juin 11 à 17:10, Williams, Norman K a écrit :
>
>
>  I ran into this in cleaning up the FEM stuff:
>>
>>
>> In many places in ITK, the notation
>>
>> &*ASmartPointer
>>
>> is used in preference to
>>
>> SmartPointer.GetPointer()
>>
>> This seems like an over-concise obfuscation to me, and something likely to
>> confuse people new to smart pointers. 'Take the address of what's pointed
>> to by this pointer' is what most people would see at first, and it depends
>> on overloading: overloading that's hidden deep somewhere in included
>> headers.
>>
>> I'd like to get rid of them all, but not without consulting you lot.
>> WHO'S WITH ME?
>>
>
>
> Sounds like a good idea.
>
> I'm not even sure this notation or the .GetPointer() are required in many
> places.
> Excepted while casting, just using the smart pointer should be fine.
>
> Gaëtan
>
>
>
> --
> Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
> http://mima2.jouy.inra.fr  http://www.itk.org
> http://www.bepo.fr
>
>
> _______________________________________________
> 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
>
>


-- 
+1 919 869 8849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110630/74f1b03e/attachment.htm>


More information about the Insight-developers mailing list