[Dune] [Dune-Commit] dune-common r5515 - trunk/common
Oliver Sander
sander at mi.fu-berlin.de
Sun May 10 22:17:05 CEST 2009
I think I implemented the assignment operator. Must have forgotten
about the cc.
:-|
Oliver
mnolte at dune-project.org schrieb:
> Author: mnolte
> Date: 2009-05-10 22:13:55 +0200 (Sun, 10 May 2009)
> New Revision: 5515
>
> Modified:
> trunk/common/fvector.hh
> Log:
> add copy constructor to FieldVector
>
> This seems to fix the warning about the use of an uninitialized variable
> when using FieldVector< T, 0 >.
>
> I thought Oli already implemented this, though.
>
>
> Modified: trunk/common/fvector.hh
> ===================================================================
> --- trunk/common/fvector.hh 2009-05-09 20:54:42 UTC (rev 5514)
> +++ trunk/common/fvector.hh 2009-05-10 20:13:55 UTC (rev 5515)
> @@ -396,6 +396,13 @@
> }
> #endif
>
> + /** \brief copy constructor */
> + FieldVector ( const FieldVector &other )
> + {
> + for( size_type i = 0; i < SIZE; ++i )
> + p[ i ] = other[ i ];
> + }
> +
> /** \brief Assigment from other vector */
> FieldVector& operator= (const FieldVector& other) {
> for (size_type i=0; i<SIZE; i++)
>
>
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit
>
--
************************************************************************
* Oliver Sander ** email: sander at mi.fu-berlin.de *
* Freie Universität Berlin ** phone: + 49 (30) 838 75348 *
* Institut für Mathematik ** URL : page.mi.fu-berlin.de/~sander *
* Arnimallee 6 ** -------------------------------------*
* 14195 Berlin, Germany ** Member of MATHEON (www.matheon.de) *
************************************************************************
More information about the Dune
mailing list