Bug 780387 - Part d: Stop using PRFloat64; r=bsmedberg
This commit is contained in:
@@ -50,7 +50,7 @@ nsDOMSimpleGestureEvent::GetDirection(PRUint32 *aDirection)
|
||||
|
||||
/* readonly attribute float delta; */
|
||||
NS_IMETHODIMP
|
||||
nsDOMSimpleGestureEvent::GetDelta(PRFloat64 *aDelta)
|
||||
nsDOMSimpleGestureEvent::GetDelta(double *aDelta)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aDelta);
|
||||
*aDelta = static_cast<nsSimpleGestureEvent*>(mEvent)->delta;
|
||||
@@ -83,7 +83,7 @@ nsDOMSimpleGestureEvent::InitSimpleGestureEvent(const nsAString& aTypeArg,
|
||||
PRUint16 aButton,
|
||||
nsIDOMEventTarget* aRelatedTarget,
|
||||
PRUint32 aDirectionArg,
|
||||
PRFloat64 aDeltaArg,
|
||||
double aDeltaArg,
|
||||
PRUint32 aClickCountArg)
|
||||
{
|
||||
nsresult rv = nsDOMMouseEvent::InitMouseEvent(aTypeArg,
|
||||
|
||||
@@ -335,7 +335,7 @@ nsXULTemplateQueryProcessorStorage::CompileQuery(nsIXULTemplateBuilder* aBuilder
|
||||
rv = NS_ERROR_ILLEGAL_VALUE;
|
||||
PRInt32 valInt32 = 0;
|
||||
PRInt64 valInt64 = 0;
|
||||
PRFloat64 valFloat = 0;
|
||||
double valFloat = 0;
|
||||
|
||||
switch (typeValue) {
|
||||
case 0:
|
||||
|
||||
@@ -1006,7 +1006,7 @@ nsDOMWindowUtils::SendSimpleGestureEvent(const nsAString& aType,
|
||||
float aX,
|
||||
float aY,
|
||||
PRUint32 aDirection,
|
||||
PRFloat64 aDelta,
|
||||
double aDelta,
|
||||
PRInt32 aModifiers,
|
||||
PRUint32 aClickCount)
|
||||
{
|
||||
|
||||
@@ -132,7 +132,7 @@ void nsPNGDecoder::SetAnimFrameInfo()
|
||||
// Need to cast delay_num to float to have a proper division and
|
||||
// the result to int to avoid compiler warning
|
||||
timeout = static_cast<PRInt32>
|
||||
(static_cast<PRFloat64>(delay_num) * 1000 / delay_den);
|
||||
(static_cast<double>(delay_num) * 1000 / delay_den);
|
||||
}
|
||||
|
||||
PRUint32 numFrames = mImage.GetNumFrames();
|
||||
|
||||
@@ -812,7 +812,7 @@ imgCacheQueue imgLoader::sCacheQueue;
|
||||
imgLoader::imgCacheTable imgLoader::sChromeCache;
|
||||
imgCacheQueue imgLoader::sChromeCacheQueue;
|
||||
|
||||
PRFloat64 imgLoader::sCacheTimeWeight;
|
||||
double imgLoader::sCacheTimeWeight;
|
||||
PRUint32 imgLoader::sCacheMaxSize;
|
||||
|
||||
NS_IMPL_ISUPPORTS5(imgLoader, imgILoader, nsIContentSniffer, imgICache, nsISupportsWeakReference, nsIObserver)
|
||||
|
||||
@@ -324,7 +324,7 @@ private: // data
|
||||
|
||||
static imgCacheTable sChromeCache;
|
||||
static imgCacheQueue sChromeCacheQueue;
|
||||
static PRFloat64 sCacheTimeWeight;
|
||||
static double sCacheTimeWeight;
|
||||
static PRUint32 sCacheMaxSize;
|
||||
|
||||
nsCString mAcceptHeader;
|
||||
|
||||
@@ -19,7 +19,7 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
#include "prinrval.h"
|
||||
#endif
|
||||
|
||||
const PRFloat64 growthRate = 1.2;
|
||||
const double growthRate = 1.2;
|
||||
|
||||
// Bug 183111, editor now replaces multiple spaces with leading
|
||||
// 0xA0's and a single ending space, so need to treat 0xA0's as spaces.
|
||||
|
||||
@@ -544,7 +544,7 @@ InputTestConsumer::OnStopRequest(nsIRequest *request, nsISupports* context,
|
||||
LOG(("\tRead: %lld bytes.\n", info->mBytesRead));
|
||||
if (info->mBytesRead == PRInt64(0)) {
|
||||
} else if (readTime > 0.0) {
|
||||
LOG(("\tThroughput: %.0f bps.\n", (PRFloat64)(info->mBytesRead*PRInt64(8))/readTime));
|
||||
LOG(("\tThroughput: %.0f bps.\n", (double)(info->mBytesRead*PRInt64(8))/readTime));
|
||||
} else {
|
||||
LOG(("\tThroughput: REAL FAST!!\n"));
|
||||
}
|
||||
|
||||
@@ -393,7 +393,7 @@ nsCRLManager::ComputeNextAutoUpdateTime(nsICRLInfo *info,
|
||||
PRInt64 temp;
|
||||
PRInt64 cycleCnt = 0;
|
||||
PRInt64 secsInDayCnt;
|
||||
PRFloat64 tmpData;
|
||||
double tmpData;
|
||||
|
||||
LL_L2F(tmpData,secsInDay);
|
||||
LL_MUL(tmpData,dayCnt,tmpData);
|
||||
|
||||
@@ -2914,7 +2914,7 @@ nsDownload::SetProgressBytes(PRInt64 aCurrBytes, PRInt64 aMaxBytes)
|
||||
else if (maxBytes <= 0)
|
||||
mPercentComplete = -1;
|
||||
else
|
||||
mPercentComplete = (PRInt32)((PRFloat64)currBytes / maxBytes * 100 + .5);
|
||||
mPercentComplete = (PRInt32)((double)currBytes / maxBytes * 100 + .5);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
||||
@@ -1713,7 +1713,7 @@ class nsSimpleGestureEvent : public nsMouseEvent_base
|
||||
{
|
||||
public:
|
||||
nsSimpleGestureEvent(bool isTrusted, PRUint32 msg, nsIWidget* w,
|
||||
PRUint32 directionArg, PRFloat64 deltaArg)
|
||||
PRUint32 directionArg, double deltaArg)
|
||||
: nsMouseEvent_base(isTrusted, msg, w, NS_SIMPLE_GESTURE_EVENT),
|
||||
direction(directionArg), delta(deltaArg), clickCount(0)
|
||||
{
|
||||
@@ -1727,7 +1727,7 @@ public:
|
||||
}
|
||||
|
||||
PRUint32 direction; // See nsIDOMSimpleGestureEvent for values
|
||||
PRFloat64 delta; // Delta for magnify and rotate events
|
||||
double delta; // Delta for magnify and rotate events
|
||||
PRUint32 clickCount; // The number of taps for tap events
|
||||
};
|
||||
|
||||
|
||||
@@ -2081,7 +2081,7 @@ nsWindow::OnGestureEvent(QGestureEvent* event, bool &handled) {
|
||||
mPinchEvent.needDispatch = false;
|
||||
|
||||
double distance = DistanceBetweenPoints(swipe->hotSpot(), mPinchEvent.touchPoint) * 2;
|
||||
PRFloat64 delta = distance - mPinchEvent.startDistance;
|
||||
double delta = distance - mPinchEvent.startDistance;
|
||||
|
||||
DispatchGestureEvent(NS_SIMPLE_GESTURE_MAGNIFY, 0, delta / 2, hotspot);
|
||||
|
||||
|
||||
@@ -490,7 +490,7 @@ XRemoteClient::FindBestWindow(const char *aProgram, const char *aUsername,
|
||||
if (!data_return)
|
||||
continue;
|
||||
|
||||
PRFloat64 version = PR_strtod((char*) data_return, nullptr);
|
||||
double version = PR_strtod((char*) data_return, nullptr);
|
||||
XFree(data_return);
|
||||
|
||||
if (aSupportsCommandLine && !(version >= 5.1 && version < 6))
|
||||
|
||||
@@ -991,7 +991,7 @@ nsLocalFile::SetLastModifiedTime(PRInt64 aLastModTime)
|
||||
ut.actime = mCachedStat.st_atime;
|
||||
|
||||
// convert milliseconds to seconds since the unix epoch
|
||||
ut.modtime = (time_t)(PRFloat64(aLastModTime) / PR_MSEC_PER_SEC);
|
||||
ut.modtime = (time_t)(double(aLastModTime) / PR_MSEC_PER_SEC);
|
||||
result = utime(mPath.get(), &ut);
|
||||
} else {
|
||||
result = utime(mPath.get(), nullptr);
|
||||
|
||||
@@ -28,7 +28,6 @@ int main()
|
||||
SHOW_TYPE(PRUint8);
|
||||
SHOW_TYPE(PRInt16);
|
||||
SHOW_TYPE(PRUint32);
|
||||
SHOW_TYPE(PRFloat64);
|
||||
SHOW_TYPE(void*);
|
||||
SHOW_TYPE(double);
|
||||
SHOW_TYPE(short[7]);
|
||||
|
||||
Reference in New Issue
Block a user