On Wed, May 30, 2012 at 3:36 PM, Roy Stogner <royst...@ices.utexas.edu> wrote:
>
> On Wed, 30 May 2012, John Peterson wrote:
>
>> On Wed, May 30, 2012 at 3:01 PM, John Peterson <jwpeter...@gmail.com>
>> wrote:
>>
>>> Your second patch isn't really a great fix, since technically things
>>> should be initialized in the constructor in the order they are
>>> declared in the class, but, thinking about it for a moment, this
>>> constructor is just oddly-written in general:  there's not really any
>>> need to call all these vector default constructors explicitly.
>>> Probably just really old code I'm guessing...should be fine to just
>>> delete all of those guys.
>>
>>
>> Although svn blame tells me Roy added all these recently on 13 Jan
>> 2011, so he will enlighten me hopefully.
>
>
> Calling those constructors explicitly shouldn't change the generated
> code at all - doing so just wards off complaints from -Weffc++.

And makes it moderately tricker to deal with #ifdef's.

Paul, what do you think about this version, moving the commas down?
It keeps the initialization order and still keeps -Weffc++ happy.  I
think it should work with any combination of the #ifdef's....

inline
FEBase::FEBase(const unsigned int d,
               const FEType& fet) :
  FEAbstract(d,fet),
  phi(),
  dphi(),
  dphidxi(),
  dphideta(),
  dphidzeta(),
  dphidx(),
  dphidy(),
  dphidz()
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
  ,d2phi(),
  d2phidxi2(),
  d2phidxideta(),
  d2phidxidzeta(),
  d2phideta2(),
  d2phidetadzeta(),
  d2phidzeta2(),
  d2phidx2(),
  d2phidxdy(),
  d2phidxdz(),
  d2phidy2(),
  d2phidydz(),
  d2phidz2()
#endif
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
  ,dphase(),
  dweight(),
  weight()
#endif
{
}





-- 
John

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to