mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 792581 - part 17: Replace LL_L2F macro with a double cast. r=ehsan
This commit is contained in:
parent
464807b57d
commit
40a4eebd6c
@ -393,10 +393,8 @@ nsCRLManager::ComputeNextAutoUpdateTime(nsICRLInfo *info,
|
||||
int64_t temp;
|
||||
int64_t cycleCnt = 0;
|
||||
int64_t secsInDayCnt;
|
||||
double tmpData;
|
||||
|
||||
LL_L2F(tmpData,secsInDay);
|
||||
tmpData = dayCnt * tmpData;
|
||||
double tmpData = double(secsInDay);
|
||||
tmpData *= dayCnt;
|
||||
LL_F2L(secsInDayCnt,tmpData);
|
||||
microsecInDayCnt = secsInDayCnt * PR_USEC_PER_SEC;
|
||||
|
||||
|
@ -437,7 +437,6 @@ double getAverage(VarianceState* inVariance)
|
||||
if(NULL != inVariance && 0 < inVariance->mCount)
|
||||
{
|
||||
double count;
|
||||
double sum;
|
||||
int64_t isum;
|
||||
|
||||
/*
|
||||
@ -446,9 +445,8 @@ double getAverage(VarianceState* inVariance)
|
||||
isum = inVariance->mSum;
|
||||
|
||||
count = (double)inVariance->mCount;
|
||||
LL_L2F(sum, isum);
|
||||
|
||||
retval = sum / count;
|
||||
retval = (double)isum / count;
|
||||
}
|
||||
|
||||
return retval;
|
||||
@ -465,7 +463,6 @@ double getVariance(VarianceState* inVariance)
|
||||
if(NULL != inVariance && 1 < inVariance->mCount)
|
||||
{
|
||||
double count;
|
||||
double squaredSum;
|
||||
double avg;
|
||||
double squaredAvg;
|
||||
int64_t isquaredSum;
|
||||
@ -476,12 +473,11 @@ double getVariance(VarianceState* inVariance)
|
||||
isquaredSum = inVariance->mSquaredSum;
|
||||
|
||||
count = (double)inVariance->mCount;
|
||||
LL_L2F(squaredSum, isquaredSum);
|
||||
|
||||
avg = getAverage(inVariance);
|
||||
squaredAvg = avg * avg;
|
||||
|
||||
retval = (squaredSum - (count * squaredAvg)) / (count - 1.0);
|
||||
retval = ((double)isquaredSum - (count * squaredAvg)) / (count - 1.0);
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
Loading…
Reference in New Issue
Block a user