2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-23 16:12:09 +00:00

FIX resize: avoid unitialised assignment warning for data_=data; Hopefully the 'if' clause does not effect efficiency on modern architectures

svn path=/trunk/boost/boost/numeric/ublas/; revision=30718
This commit is contained in:
Michael Stevens
2005-08-29 11:08:08 +00:00
parent a846666ab0
commit d05c3bad41

View File

@@ -161,14 +161,12 @@ namespace boost { namespace numeric { namespace ublas {
}
alloc_.deallocate (data_, size_);
}
#ifdef NDEBUG
data_ = data;
#else
// simplify debugging by giving data_ a definate value
if (size)
data_ = data;
#ifndef NDEBUG
else
data_ = 0;
data_ = 0; // simplify debugging by giving data_ a definate value
#endif
size_ = size;
}