Subject: Re: [geometry] warnings reported by Clang
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2012-01-11 15:56:58
On 11 January 2012 20:54, Barend Gehrels <barend_at_[hidden]> wrote:
> On 11-1-2012 21:35, Mateusz Loskot wrote:
>> On 11 January 2012 20:24, Vishnu<vrang3_at_[hidden]> Â wrote:
>>> I'll set the default values of the pointers to 0 and see if all my tests
>>> pass, which I should be the case if Barend's comment Â ("this is all in
>>> concept checking and never called") still holds. However, if anything has
>>> changed to invalidate that comment, please let me know.
>> IMHO, it doesn't hurt to have variables initialised, regardless where they
>> In some cases, it explicit initialisations hurt performance, but this
>> is not the case here.
>> I hope Barend will agree with me.
>> Once concepts make it into C++, then compilers will know to ignore such
>> uninitialized objects, but so far we have to help the compilers to
>> overcome their
>> lameness :)
> I agree, this is never called, so it does not hurt to initalize them.
> However, 0 may sometimes (for ttmath) need to be written in another form
> (either T() or an object), especially for ttmath. But go ahead, I will solve
> that if it occurs.
Oh, yes, I missed that. If templates are involved, T() should be used,
not raw Zero.
-- Mateusz Loskot, http://mateusz.loskot.net
Geometry list run by mateusz at loskot.net