Comment free

This commit is contained in:
Mylloon 2022-05-09 11:41:05 +02:00
parent f426402123
commit 0dd098628e
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 7 additions and 3 deletions

View file

@ -24,7 +24,7 @@ int main(int argc, char const *argv[]) {
// Création du quadtree
QuadTree quadtree(s);
SDL_FreeSurface(s);
/* SDL_FreeSurface(s); */
// Enregistrement du résultat
std::string chemin_image("resultat.png");

View file

@ -30,7 +30,7 @@ QuadTree::QuadTree(SDL_Surface * image, short niveau_p): niveau(niveau_p), coule
}
QuadTree::~QuadTree(void) {
if(nord_ouest != nullptr) {
/* if(nord_ouest != nullptr) {
delete nord_ouest;
}
if(nord_est != nullptr) {
@ -41,7 +41,7 @@ QuadTree::~QuadTree(void) {
}
if(sud_est != nullptr) {
delete sud_est;
}
} */
}
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);
}
/* for(auto it: morceaux) {
SDL_FreeSurface(it);
} */
return nouvelle_image;
}