mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-21 12:49:10 +00:00
Remove more unused pnUtils code.
This commit is contained in:
@ -57,11 +57,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
***/
|
||||
|
||||
#define PRIORITY_TIME(class) TPriorityTime< class >
|
||||
#define PRIORITY_NUMERIC(class,type) TPriorityNumeric< class,type >
|
||||
|
||||
#define PRIQ(class,priority) TPriorityQueue< class,priority >
|
||||
#define PRIQDECL(class,priority,field) TPriorityQueueDecl< class,priority,offsetof(class,field) >
|
||||
#define PRIQDYN(class,priority) TPriorityQueueDyn< class,priority >
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
@ -351,19 +349,6 @@ public:
|
||||
};
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* TPriorityQueueDyn
|
||||
*
|
||||
***/
|
||||
|
||||
template<class C, class P>
|
||||
class TPriorityQueueDyn : public TPriorityQueue<C,P> {
|
||||
public:
|
||||
void Initialize (int linkOffset) { this->SetLinkOffset(linkOffset); }
|
||||
};
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* class TBasePriority
|
||||
@ -419,39 +404,6 @@ void TBasePriority<C,P>::Relink () {
|
||||
queue->Enqueue(object);
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* class TPriorityNumeric
|
||||
*
|
||||
***/
|
||||
|
||||
template<class C,class T>
|
||||
class TPriorityNumeric : public TBasePriority< C, TPriorityNumeric<C,T> > {
|
||||
|
||||
public:
|
||||
TPriorityNumeric () : m_value(0) { }
|
||||
TPriorityNumeric (T value) : m_value(value) { }
|
||||
void Set (T value) {
|
||||
if (value == m_value)
|
||||
return;
|
||||
m_value = value;
|
||||
this->Relink();
|
||||
}
|
||||
T Get () const {
|
||||
return m_value;
|
||||
}
|
||||
bool IsPriorityHigher (const TPriorityNumeric<C,T> & source) {
|
||||
return m_value > source.m_value;
|
||||
}
|
||||
bool IsPriorityHigher (T value) const {
|
||||
return m_value > value;
|
||||
}
|
||||
|
||||
private:
|
||||
T m_value;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* class TPriorityTime
|
||||
|
Reference in New Issue
Block a user