mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
17 lines
382 B
C++
17 lines
382 B
C++
|
|
#include "storm/queue/CSBasePriority.hpp"
|
||
|
|
|
||
|
|
template <class T>
|
||
|
|
class TSTimerPriority : public CSBasePriority {
|
||
|
|
public:
|
||
|
|
// Member variables
|
||
|
|
T m_val;
|
||
|
|
|
||
|
|
// Member functions
|
||
|
|
virtual bool Compare(CSBasePriority* a);
|
||
|
|
};
|
||
|
|
|
||
|
|
template <class T>
|
||
|
|
bool TSTimerPriority<T>::Compare(CSBasePriority* a) {
|
||
|
|
return this->m_val - static_cast<TSTimerPriority<T>*>(a)->m_val <= 0;
|
||
|
|
}
|