From 0dd098628e41f82aa4eeefcd92e3376c8ceff432 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 9 May 2022 11:41:05 +0200 Subject: [PATCH] Comment free --- src/main.cpp | 2 +- src/quadtree.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 9cec802..60d4ede 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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"); diff --git a/src/quadtree.cpp b/src/quadtree.cpp index 66808e1..465bafe 100644 --- a/src/quadtree.cpp +++ b/src/quadtree.cpp @@ -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 morceaux) SDL_UnlockSurface(nouvelle_image); } + /* for(auto it: morceaux) { + SDL_FreeSurface(it); + } */ + return nouvelle_image; }