Skip to content
Snippets Groups Projects
Commit 297bc621 authored by Christian Engwer's avatar Christian Engwer
Browse files

don't use memcopy

[[Imported from SVN: r5926]]
parent 4a4f9781
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment