k3kaimu
9/23/2014 - 10:05 AM

gistfile1.cpp

struct LessNode{
    bool operator()(std::shared_ptr<Node> const & ln, std::shared_ptr<Node> const & rn) const {
        if (ln->get_totalcost() < rn->get_totalcost())
            return true;
        else if (ln->get_totalcost() > rn->get_totalcost())
            return false;

        return ln.get() < rn.get();
    }
};