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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user