Comment free
This commit is contained in:
parent
f426402123
commit
0dd098628e
2 changed files with 7 additions and 3 deletions
|
@ -24,7 +24,7 @@ int main(int argc, char const *argv[]) {
|
||||||
// Création du quadtree
|
// Création du quadtree
|
||||||
QuadTree quadtree(s);
|
QuadTree quadtree(s);
|
||||||
|
|
||||||
SDL_FreeSurface(s);
|
/* SDL_FreeSurface(s); */
|
||||||
|
|
||||||
// Enregistrement du résultat
|
// Enregistrement du résultat
|
||||||
std::string chemin_image("resultat.png");
|
std::string chemin_image("resultat.png");
|
||||||
|
|
|
@ -30,7 +30,7 @@ QuadTree::QuadTree(SDL_Surface * image, short niveau_p): niveau(niveau_p), coule
|
||||||
}
|
}
|
||||||
|
|
||||||
QuadTree::~QuadTree(void) {
|
QuadTree::~QuadTree(void) {
|
||||||
if(nord_ouest != nullptr) {
|
/* if(nord_ouest != nullptr) {
|
||||||
delete nord_ouest;
|
delete nord_ouest;
|
||||||
}
|
}
|
||||||
if(nord_est != nullptr) {
|
if(nord_est != nullptr) {
|
||||||
|
@ -41,7 +41,7 @@ QuadTree::~QuadTree(void) {
|
||||||
}
|
}
|
||||||
if(sud_est != nullptr) {
|
if(sud_est != nullptr) {
|
||||||
delete sud_est;
|
delete sud_est;
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Surface * QuadTree::image(short niveau_p) {
|
SDL_Surface * QuadTree::image(short niveau_p) {
|
||||||
|
@ -213,5 +213,9 @@ SDL_Surface * QuadTree::colleQuatreImages(std::array<SDL_Surface *, 4> morceaux)
|
||||||
SDL_UnlockSurface(nouvelle_image);
|
SDL_UnlockSurface(nouvelle_image);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* for(auto it: morceaux) {
|
||||||
|
SDL_FreeSurface(it);
|
||||||
|
} */
|
||||||
|
|
||||||
return nouvelle_image;
|
return nouvelle_image;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue