diff --git a/src/multi_array_operation.cc b/src/multi_array_operation.cc index 624807a..8b259ff 100644 --- a/src/multi_array_operation.cc +++ b/src/multi_array_operation.cc @@ -11,8 +11,8 @@ namespace MultiArrayTools MultiArrayOperationBase:: MultiArrayOperationBase(MultiArray& ma, const Name& nm) : mArrayRef(ma), - //mIndex(mArrayRef.begin()), - mIibPtr(new IndexType(mArrayRef.begin())), + mIndex(mArrayRef.begin()), + mIibPtr(&mIndex), mNm(nm) { mIibPtr->name(nm); diff --git a/src/multi_array_operation.h b/src/multi_array_operation.h index 261c5f7..fca3f78 100644 --- a/src/multi_array_operation.h +++ b/src/multi_array_operation.h @@ -64,7 +64,7 @@ namespace MultiArrayTools protected: MultiArray& mArrayRef; - //mutable IndexType mIndex; + mutable IndexType mIndex; IndefinitIndexBase* mIibPtr = nullptr; Name mNm; };