diff --git a/engine.cpp b/engine.cpp index ad06a1f..e579489 100644 --- a/engine.cpp +++ b/engine.cpp @@ -75,7 +75,7 @@ void Engine::draw() { window.clear(sf::Color(66, 165, 245)); // chargement de la file d'affichage des objets - std::priority_queue, CompareObjectLayer> display_queue; + std::priority_queue, ObjectCompare> display_queue; for (unsigned int i = 0; i < objects.size(); i++) { display_queue.push(objects[i]); diff --git a/object.hpp b/object.hpp index 96019a9..0381cd9 100644 --- a/object.hpp +++ b/object.hpp @@ -2,7 +2,6 @@ #define __PTF_OBJECT_HPP__ #include -#include #include "state.hpp" class Object { @@ -51,10 +50,10 @@ public: * Renvoie "true" si le premier objet est sur une couche * qui doit ĂȘtre dessinĂ©e avant celle du second */ -struct CompareObjectLayer { - bool operator()(Object* const &obj1, Object* const &obj2) { - return obj1->getLayer() < obj2->getLayer(); - } +struct ObjectCompare { + bool operator()(Object* const &t1, Object* const &t2) { + return t1->getLayer() > t2->getLayer(); + } }; #endif