From f7bc3fbae57547127f84c338b64fedf8dedf259d Mon Sep 17 00:00:00 2001 From: Rtch90 Date: Thu, 2 Feb 2012 22:37:46 +0000 Subject: [PATCH] [Add] Comparison method for the cost two nodes. --- src/libUnuk/Engine/Pathfinding.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/libUnuk/Engine/Pathfinding.h b/src/libUnuk/Engine/Pathfinding.h index 287e561..21f6ab2 100644 --- a/src/libUnuk/Engine/Pathfinding.h +++ b/src/libUnuk/Engine/Pathfinding.h @@ -40,4 +40,15 @@ public: UserState _UserState; }; + + // Compare the f values of the two nodes. + class HeapCompare_f { + public: + bool operator()(const Node* x, const Node* y) const { + return x->f > y->f; + } + }; + +public: + };