Initialize the result value in nsViewManager::SetFrameRate b=32381 r=rods@netscape.com

This commit is contained in:
kmcclusk%netscape.com 2000-03-21 21:47:50 +00:00
Родитель dbc6706464
Коммит 498a49a30a
2 изменённых файлов: 10 добавлений и 16 удалений

Просмотреть файл

@ -347,7 +347,7 @@ NS_IMETHODIMP nsViewManager :: GetFrameRate(PRUint32 &aRate)
NS_IMETHODIMP nsViewManager :: SetFrameRate(PRUint32 aFrameRate)
{
nsresult rv;
nsresult rv = NS_OK;
if (aFrameRate != mFrameRate)
{
@ -372,11 +372,7 @@ NS_IMETHODIMP nsViewManager :: SetFrameRate(PRUint32 aFrameRate)
mTimer->Init(vm_timer_callback, this, 1000 / mFrameRate);
#endif
}
else
rv = NS_OK;
}
else
rv = NS_OK;
return rv;
}

Просмотреть файл

@ -347,35 +347,33 @@ NS_IMETHODIMP nsViewManager2::GetFrameRate(PRUint32 &aRate)
NS_IMETHODIMP nsViewManager2::SetFrameRate(PRUint32 aFrameRate)
{
nsresult rv;
nsresult rv = NS_OK;
if (aFrameRate != mFrameRate)
{
{
#ifdef NS_VIEWMANAGER_NEEDS_TIMER
if (nsnull != mTimer)
{
{
mTimer->Cancel(); //XXX this should not be necessary. MMP
NS_RELEASE(mTimer);
}
}
#endif
mFrameRate = aFrameRate;
mTrueFrameRate = aFrameRate;
if (mFrameRate != 0)
{
{
#ifdef NS_VIEWMANAGER_NEEDS_TIMER
rv = NS_NewTimer(&mTimer);
if (NS_OK == rv)
mTimer->Init(vm_timer_callback, this, 1000 / mFrameRate);
#endif
}
else
rv = NS_OK;
}
else
rv = NS_OK;
}
}
return rv;
}