--- branches/development/src/math/DynamicRectMatrix.hpp 2011/11/22 20:38:56 1665 +++ branches/development/src/math/DynamicRectMatrix.hpp 2012/10/22 20:42:10 1808 @@ -233,7 +233,7 @@ namespace OpenMD { /** * Tests if this matrix is identical to matrix m * @return true if this matrix is equal to the matrix m, return false otherwise - * @m matrix to be compared + * @param m matrix to be compared * * @todo replace operator == by template function equal */ @@ -250,7 +250,7 @@ namespace OpenMD { /** * Tests if this matrix is not equal to matrix m * @return true if this matrix is not equal to the matrix m, return false otherwise - * @m matrix to be compared + * @param m matrix to be compared */ bool operator !=(const DynamicRectMatrix m) { return !(*this == m); @@ -440,19 +440,19 @@ namespace OpenMD { unsigned int nrow_; unsigned int ncol_; private: - void allocate(int nrow, int ncol) { - nrow_ = nrow; - ncol_ = ncol; - data_ = new Real*[nrow_]; - for (int i = 0; i < nrow_; ++i) - data_[i] = new Real[ncol_]; - } - + void allocate( int nrow, int ncol ) { + nrow_ = (unsigned int) nrow; + ncol_ = (unsigned int) ncol; + data_ = new Real*[nrow_]; + for (unsigned int i = 0; i < nrow_; ++i) + data_[i] = new Real[ncol_]; + } + void deallocate() { - for (int i = 0; i < nrow_; ++i) + for (unsigned int i = 0; i < nrow_; ++i) delete data_[i]; delete []data_; - + nrow_ = 0; ncol_ = 0; data_ = NULL;