コード例 #1
0
ファイル: WordList.c プロジェクト: Dmytro-K/task2_9
void destroyBranch( WordNode *node )
{
	if( node->left ) {
		destroyBranch( node->left );
		node->left = NULL;
	}
	if( node->right ) {
		destroyBranch( node->right );
		node->right = NULL;
	}
	freeNode( node );
}
コード例 #2
0
ファイル: erubix.c プロジェクト: pombredanne/anacrolix
void destroyBranch(struct Cube_t *cube) {
	int m;
	for (m=0;m<UNIQUE_MOVES;m++) {
		if (cube->nextMove[m]) destroyBranch(cube->nextMove[m]);
	}
	GlobalFree(cube);
}
コード例 #3
0
ファイル: erubix.c プロジェクト: pombredanne/anacrolix
void destroyBranch(Cube *cube)
{
    int m;
    for (m=0; m<UNIQUE_MOVES; m++) {
        if (cube->nextMove[m]) destroyBranch(cube->nextMove[m]);
    }
    //GlobalFree(cube);
    free(cube);
}
コード例 #4
0
ファイル: erubix.c プロジェクト: pombredanne/anacrolix
void pruneClones(struct Cube_t *orig, struct Cube_t *cube) {
	if (cube->depth > orig->depth) {
		if (compareCube(orig, cube)) {
			cube->parent->nextMove[cube->lastMove] = NULL;
			destroyBranch(cube);
			return;
		}
	}
	int m;
	for (m=0;m<UNIQUE_MOVES;m++) {
		if (cube->nextMove[m]) pruneClones(orig, cube->nextMove[m]);
	}
	return;
}