diff --git a/src/include/multi_array.cc.h b/src/include/multi_array.cc.h index e4c5d92..f6fcbdf 100644 --- a/src/include/multi_array.cc.h +++ b/src/include/multi_array.cc.h @@ -219,7 +219,7 @@ namespace MultiArrayTools } else { assert( PackNum::checkIfSameInstance( MAB::mRange->space(), in.mRange->space() ) ); - for(size_t i = 0; i != size(); ++i){ + for(size_t i = 0; i != mCont.size(); ++i){ mCont[i] += in.mCont[i]; } //std::transform(mCont.begin(), mCont.end(), in.mCont.begin(), mCont.begin(), std::plus()); @@ -235,7 +235,7 @@ namespace MultiArrayTools } else { assert( PackNum::checkIfSameInstance( MAB::mRange->space(), in.mRange->space() ) ); - for(size_t i = 0; i != size(); ++i){ + for(size_t i = 0; i != mCont.size(); ++i){ mCont[i] -= in.mCont[i]; } //std::transform(mCont.begin(), mCont.end(), in.mCont.begin(), mCont.begin(), std::minus());