mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
Part 4 could not suck more.
Part 4 could not suck more. Sigh.. do_CreateInstance where was this defined so identifier is found..
This commit is contained in:
parent
f109b02bc3
commit
436a8d5697
2 changed files with 27 additions and 20 deletions
|
|
@ -85,7 +85,7 @@ private:
|
|||
|
||||
class Entry final : public nsTimerImplHolder
|
||||
{
|
||||
const TimeStamp mTimeout;
|
||||
TimeStamp mTimeout;
|
||||
|
||||
public:
|
||||
Entry(const TimeStamp& aMinTimeout, const TimeStamp& aTimeout,
|
||||
|
|
@ -110,16 +110,23 @@ private:
|
|||
return mTimerImpl.forget();
|
||||
}
|
||||
|
||||
static bool
|
||||
UniquePtrLessThan(UniquePtr<Entry>& aLeft, UniquePtr<Entry>& aRight)
|
||||
Entry(Entry&& aRight) = default;
|
||||
Entry& operator=(Entry&& aRight) = default;
|
||||
|
||||
bool operator<(const Entry& aRight) const
|
||||
{
|
||||
// This is reversed because std::push_heap() sorts the "largest" to
|
||||
// the front of the heap. We want that to be the earliest timer.
|
||||
return aRight->mTimeout < aLeft->mTimeout;
|
||||
// Reverse logic since we are inserting into a max heap
|
||||
// that sorts the "largest" value to index 0.
|
||||
return mTimeout > aRight.mTimeout;
|
||||
}
|
||||
|
||||
bool operator==(const Entry& aRight) const
|
||||
{
|
||||
return mTimeout == aRight.mTimeout;
|
||||
}
|
||||
};
|
||||
|
||||
nsTArray<UniquePtr<Entry>> mTimers;
|
||||
nsTArray<Entry> mTimers;
|
||||
};
|
||||
|
||||
struct TimerAdditionComparator
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue