Bug 348748 - Replace all instances of NS_STATIC_CAST and friends with C++ casts (and simultaneously bitrot nearly every patch in existence). r=bsmedberg on the script that did this. Tune in next time for Macro Wars: Episode II: Attack on the LL_* Macros.
git-svn-id: svn://10.0.0.236/trunk@229504 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -76,7 +76,7 @@ TimerThread::~TimerThread()
|
||||
|
||||
PRInt32 n = mTimers.Count();
|
||||
while (--n >= 0) {
|
||||
nsTimerImpl *timer = NS_STATIC_CAST(nsTimerImpl *, mTimers[n]);
|
||||
nsTimerImpl *timer = static_cast<nsTimerImpl *>(mTimers[n]);
|
||||
NS_RELEASE(timer);
|
||||
}
|
||||
}
|
||||
@@ -169,7 +169,7 @@ nsresult TimerThread::Shutdown()
|
||||
|
||||
nsTimerImpl *timer;
|
||||
for (PRInt32 i = mTimers.Count() - 1; i >= 0; i--) {
|
||||
timer = NS_STATIC_CAST(nsTimerImpl*, mTimers[i]);
|
||||
timer = static_cast<nsTimerImpl*>(mTimers[i]);
|
||||
RemoveTimerInternal(timer);
|
||||
}
|
||||
}
|
||||
@@ -250,7 +250,7 @@ NS_IMETHODIMP TimerThread::Run()
|
||||
nsTimerImpl *timer = nsnull;
|
||||
|
||||
if (mTimers.Count() > 0) {
|
||||
timer = NS_STATIC_CAST(nsTimerImpl*, mTimers[0]);
|
||||
timer = static_cast<nsTimerImpl*>(mTimers[0]);
|
||||
|
||||
if (!TIMER_LESS_THAN(now, timer->mTimeout + mTimeoutAdjustment)) {
|
||||
next:
|
||||
@@ -294,7 +294,7 @@ NS_IMETHODIMP TimerThread::Run()
|
||||
}
|
||||
|
||||
if (mTimers.Count() > 0) {
|
||||
timer = NS_STATIC_CAST(nsTimerImpl *, mTimers[0]);
|
||||
timer = static_cast<nsTimerImpl *>(mTimers[0]);
|
||||
|
||||
PRIntervalTime timeout = timer->mTimeout + mTimeoutAdjustment;
|
||||
|
||||
@@ -388,7 +388,7 @@ PRInt32 TimerThread::AddTimerInternal(nsTimerImpl *aTimer)
|
||||
PRInt32 count = mTimers.Count();
|
||||
PRInt32 i = 0;
|
||||
for (; i < count; i++) {
|
||||
nsTimerImpl *timer = NS_STATIC_CAST(nsTimerImpl *, mTimers[i]);
|
||||
nsTimerImpl *timer = static_cast<nsTimerImpl *>(mTimers[i]);
|
||||
|
||||
// Don't break till we have skipped any overdue timers. Do not include
|
||||
// mTimeoutAdjustment here, because we are really trying to avoid calling
|
||||
@@ -433,7 +433,7 @@ void TimerThread::DoAfterSleep()
|
||||
{
|
||||
mSleeping = PR_TRUE; // wake may be notified without preceding sleep notification
|
||||
for (PRInt32 i = 0; i < mTimers.Count(); i ++) {
|
||||
nsTimerImpl *timer = NS_STATIC_CAST(nsTimerImpl*, mTimers[i]);
|
||||
nsTimerImpl *timer = static_cast<nsTimerImpl*>(mTimers[i]);
|
||||
// get and set the delay to cause its timeout to be recomputed
|
||||
PRUint32 delay;
|
||||
timer->GetDelay(&delay);
|
||||
|
||||
Reference in New Issue
Block a user