From de587618e201ae3db8c2fd968851c242ea2b18fa Mon Sep 17 00:00:00 2001 From: boufaras Date: Fri, 11 Mar 2011 15:57:56 +0000 Subject: [PATCH] resizeIndices git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2184 331e1502-861f-0410-8da2-ba01fb791d7f --- .../src/neighborhood/moIndexSwapNeighbor.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/trunk/paradiseo-mo/src/neighborhood/moIndexSwapNeighbor.h b/trunk/paradiseo-mo/src/neighborhood/moIndexSwapNeighbor.h index 3aebaf5e3..0825ce2dc 100644 --- a/trunk/paradiseo-mo/src/neighborhood/moIndexSwapNeighbor.h +++ b/trunk/paradiseo-mo/src/neighborhood/moIndexSwapNeighbor.h @@ -58,7 +58,7 @@ public: */ ~moIndexSwapNeighbor() { - delete[] (indices); + //delete[] (indices); } /** @@ -93,7 +93,6 @@ public: virtual moIndexSwapNeighbor & operator=( const moIndexSwapNeighbor & _source) { moIndexNeighbor::operator=(_source); - this->key = _source.key; this->Kswap = _source.Kswap; this->reSizeIndices(Kswap); for (unsigned int i = 0; i <= Kswap; i++) @@ -133,16 +132,9 @@ public: */ void setIndices(unsigned int * _indices) { - for (unsigned int i = 0; i <= Kswap; i++) + for (unsigned int i = 0; i <= Kswap; i++){ setIndice(i, _indices[i]); - } - - /** - * Get the set of k-swap indexes - */ - - unsigned int * getIndices() { - return indices; + } } /** @@ -185,7 +177,7 @@ public: */ void reSizeIndices(unsigned int _Kswap) { - delete[] (indices); + delete [] (indices); indices = new unsigned int[_Kswap + 1]; }