From 297bc62151d4fe64fc6593fe42540e7fea74f414 Mon Sep 17 00:00:00 2001 From: Christian Engwer <christi@dune-project.org> Date: Fri, 12 Mar 2010 08:18:03 +0000 Subject: [PATCH] don't use memcopy [[Imported from SVN: r5926]] --- dune/common/fvector.hh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dune/common/fvector.hh b/dune/common/fvector.hh index 72e5ea75c..bbb52774d 100644 --- a/dune/common/fvector.hh +++ b/dune/common/fvector.hh @@ -463,16 +463,14 @@ namespace Dune { /** \brief copy constructor */ FieldVector ( const FieldVector &other ) { - // for( size_type i = 0; i < SIZE; ++i ) - // p[ i ] = other[ i ]; - std::memcpy(p,other.p,SIZE*sizeof(K)); + for( size_type i = 0; i < SIZE; ++i ) + p[ i ] = other[ i ]; } /** \brief Assigment from other vector */ FieldVector& operator= (const FieldVector& other) { - std::memcpy(p,other.p,SIZE*sizeof(K)); - // for (size_type i=0; i<SIZE; i++) - // p[i] = other[i]; + for (size_type i=0; i<SIZE; i++) + p[i] = other[i]; return *this; } -- GitLab