r=pavlov, rods, a=brendan
nsITimer implementation was using platform types (bool) instead of PRBool


git-svn-id: svn://10.0.0.236/trunk@81534 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkaply%us.ibm.com
2000-10-20 20:07:16 +00:00
parent 979f699ac5
commit 8bdb56eb73
3 changed files with 12 additions and 12 deletions

View File

@@ -39,8 +39,8 @@ public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITIMERQUEUE_IID)
NS_IMETHOD_(void) AddReadyQueue(nsITimer* timer)=0;
NS_IMETHOD_(bool) IsTimerInQueue(nsITimer* timer)=0;
NS_IMETHOD_(bool) HasReadyTimers(PRUint32 minTimerPriority)=0;
NS_IMETHOD_(PRBool) IsTimerInQueue(nsITimer* timer)=0;
NS_IMETHOD_(PRBool) HasReadyTimers(PRUint32 minTimerPriority)=0;
NS_IMETHOD_(void) FireNextReadyTimer(PRUint32 minTimerPriority)=0;
};

View File

@@ -62,14 +62,14 @@ nsresult nsTimerManager::Init()
}
NS_IMETHODIMP_(bool) nsTimerManager::IsTimerInQueue(nsITimer* timer)
NS_IMETHODIMP_(PRBool) nsTimerManager::IsTimerInQueue(nsITimer* timer)
{
if (mReadyQueue == nsnull) return false;
if (mReadyQueue == nsnull) return PR_FALSE;
for (int i=0; i<mReadyQueue->Count(); i++) {
if (mReadyQueue->ElementAt(i) == timer) return true;
if (mReadyQueue->ElementAt(i) == timer) return PR_TRUE;
}
return false;
return PR_FALSE;
}
@@ -89,12 +89,12 @@ NS_IMETHODIMP_(void) nsTimerManager::AddReadyQueue(nsITimer* timer)
}
NS_IMETHODIMP_(bool) nsTimerManager::HasReadyTimers(PRUint32 minTimerPriority)
NS_IMETHODIMP_(PRBool) nsTimerManager::HasReadyTimers(PRUint32 minTimerPriority)
{
if (mReadyQueue == nsnull || mReadyQueue->Count() == 0) return false;
if (mReadyQueue == nsnull || mReadyQueue->Count() == 0) return PR_FALSE;
nsTimer* timer = (nsTimer*) mReadyQueue->ElementAt(0);
if (timer == nsnull) return false;
if (timer == nsnull) return PR_FALSE;
return timer->GetPriority() >= minTimerPriority;
}
@@ -102,7 +102,7 @@ NS_IMETHODIMP_(bool) nsTimerManager::HasReadyTimers(PRUint32 minTimerPriority)
NS_IMETHODIMP_(void) nsTimerManager::FireNextReadyTimer(PRUint32 minTimerPriority)
{
PR_ASSERT(HasReadyTimers(minTimerPriority) == true);
PR_ASSERT(HasReadyTimers(minTimerPriority) == PR_TRUE);
if (mReadyQueue == nsnull) return;

View File

@@ -61,9 +61,9 @@ public:
// --- manage priority queue of ready timers ---
NS_IMETHOD_(void) AddReadyQueue(nsITimer* timer);
// is this timer in the ready queue?
NS_IMETHOD_(bool) IsTimerInQueue(nsITimer* timer);
NS_IMETHOD_(PRBool) IsTimerInQueue(nsITimer* timer);
// does a timer above a priority level exist in the ready queue?
NS_IMETHOD_(bool) HasReadyTimers(PRUint32 minTimerPriority);
NS_IMETHOD_(PRBool) HasReadyTimers(PRUint32 minTimerPriority);
// fire the next timer above a priority level in the ready queue
NS_IMETHOD_(void) FireNextReadyTimer(PRUint32 minTimerPriority);
};