Cleaned up and unified various sort predicates and moved them to Trinity namespace, replaced priority queues with sorts and purged some unused code.

--HG--
branch : trunk
This commit is contained in:
Xanadu
2010-05-30 04:23:27 +02:00
parent 14382dd1fe
commit 7fbeef3d09
13 changed files with 105 additions and 235 deletions
-24
View File
@@ -450,28 +450,4 @@ void Trinity::LocalizedPacketListDo<Builder>::operator()(Player* p)
p->SendDirectMessage((*data_list)[i]);
}
struct ObjectDistanceOrder : public std::binary_function<const WorldObject, const WorldObject, bool>
{
const Unit* m_pSource;
ObjectDistanceOrder(const Unit* pSource) : m_pSource(pSource) {};
bool operator()(const WorldObject* pLeft, const WorldObject* pRight) const
{
return m_pSource->GetDistanceOrder(pLeft, pRight);
}
};
struct ObjectDistanceOrderReversed : public std::binary_function<const WorldObject, const WorldObject, bool>
{
const Unit* m_pSource;
ObjectDistanceOrderReversed(const Unit* pSource) : m_pSource(pSource) {};
bool operator()(const WorldObject* pLeft, const WorldObject* pRight) const
{
return !m_pSource->GetDistanceOrder(pLeft, pRight);
}
};
#endif // TRINITY_GRIDNOTIFIERSIMPL_H