From 0f7e2835e30074e63e15da27e1219b2668c35574 Mon Sep 17 00:00:00 2001 From: PBerger Date: Thu, 13 Jun 2013 15:43:40 +0200 Subject: [PATCH] Added an assignment constructor to the SparseMatrix.h Now fixed this "constructor" to be a real operator and compile. Former-commit-id: 83fe702ab3b8beae939bcefa97843f14c873d7d0 --- src/storage/SparseMatrix.h | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/storage/SparseMatrix.h b/src/storage/SparseMatrix.h index 057955b70..12a0a6e93 100644 --- a/src/storage/SparseMatrix.h +++ b/src/storage/SparseMatrix.h @@ -231,7 +231,7 @@ public: * * @param other The Matrix from which to move the content */ - SparseMatrix(SparseMatrix&& other) + SparseMatrix(SparseMatrix&& other) : rowCount(other.rowCount), colCount(other.colCount), nonZeroEntryCount(other.nonZeroEntryCount), valueStorage(std::move(other.valueStorage)), columnIndications(std::move(other.columnIndications)), rowIndications(std::move(other.rowIndications)), internalStatus(other.internalStatus), @@ -250,7 +250,7 @@ public: * * @param other The Matrix from which to copy the content */ - SparseMatrix(const SparseMatrix & other) + SparseMatrix(const SparseMatrix & other) : rowCount(other.rowCount), colCount(other.colCount), nonZeroEntryCount(other.nonZeroEntryCount), valueStorage(other.valueStorage), columnIndications(other.columnIndications), rowIndications(other.rowIndications), internalStatus(other.internalStatus), @@ -258,15 +258,24 @@ public: } /*! - * Copy Assignment Constructor. + * Copy Assignment Operator. * * @param other The Matrix from which to copy the content */ - storm::storage::SparseMatrix& operator=(const SparseMatrix & other) - : rowCount(other.rowCount), colCount(other.colCount), nonZeroEntryCount(other.nonZeroEntryCount), - valueStorage(other.valueStorage), columnIndications(other.columnIndications), - rowIndications(other.rowIndications), internalStatus(other.internalStatus), - currentSize(other.currentSize), lastRow(other.lastRow) { + storm::storage::SparseMatrix& operator=(const SparseMatrix & other) { + this->rowCount = other.rowCount; + this->colCount = other.colCount; + this->nonZeroEntryCount = other.nonZeroEntryCount; + + this->valueStorage = other.valueStorage; + this->columnIndications = other.columnIndications; + this->rowIndications = other.rowIndications; + + this->internalStatus = other.internalStatus; + this->currentSize = other.currentSize; + this->lastRow = other.lastRow; + + return *this; } /*!