static int INCREMENT=1000;\r
\r
#define BLOCKSIZE 128\r
-#define SWAP(tmp,a,b) tmp=a; a=b; b=tmp;\r
+#define SWAP(x,y) do {typeof(x) temp##x##y = x; x = y; y = temp##x##y; } while (0)\r
\r
static vector< vector< vector<bool> > > chromosome;\r
static int * fragmentLength;\r
\r
void NewGeneration(){\r
\r
- int *** ptrmatrix, * vector;\r
- bool * boolvector;\r
- \r
// for(int i=0;i<maxN;i++){\r
// if(parent_flags[i])printf("numBlock=%d parent=%d first=%d last=%d\n",numBLOCKs,i,parent_First[i],parent_Last[i]); \r
// }\r
\r
- SWAP(ptrmatrix, children, parents);\r
- SWAP(vector, child_First, parent_First);\r
- SWAP(vector, child_Last, parent_Last);\r
- SWAP(boolvector, child_flags, parent_flags);\r
- SWAP(vector, cblocks, pblocks);\r
+ SWAP(children, parents);\r
+ SWAP(child_First, parent_First);\r
+ SWAP(child_Last, parent_Last);\r
+ SWAP(child_flags, parent_flags);\r
+ SWAP(cblocks, pblocks);\r
\r
if(!noChange){\r
currentProfile++;\r