Bug 780387 - Part a: Stop using PRPtrdiff; r=bsmedberg

This commit is contained in:
Ms2ger 2012-08-09 09:09:31 +02:00
parent 4e31d26766
commit 5a4f28eb7b
3 changed files with 3 additions and 3 deletions

View File

@ -87,7 +87,7 @@ bool nsTArray_base<Alloc>::UsesAutoArrayBuffer() const {
"see comment above"); "see comment above");
#ifdef DEBUG #ifdef DEBUG
PRPtrdiff diff = reinterpret_cast<const char*>(GetAutoArrayBuffer(8)) - ptrdiff_t diff = reinterpret_cast<const char*>(GetAutoArrayBuffer(8)) -
reinterpret_cast<const char*>(GetAutoArrayBuffer(4)); reinterpret_cast<const char*>(GetAutoArrayBuffer(4));
NS_ABORT_IF_FALSE(diff >= 0 && diff <= 4, "GetAutoArrayBuffer doesn't do what we expect."); NS_ABORT_IF_FALSE(diff >= 0 && diff <= 4, "GetAutoArrayBuffer doesn't do what we expect.");
#endif #endif

View File

@ -97,7 +97,7 @@ PL_DHashStringKey(PLDHashTable *table, const void *key)
PLDHashNumber PLDHashNumber
PL_DHashVoidPtrKeyStub(PLDHashTable *table, const void *key) PL_DHashVoidPtrKeyStub(PLDHashTable *table, const void *key)
{ {
return (PLDHashNumber)(PRPtrdiff)key >> 2; return (PLDHashNumber)(ptrdiff_t)key >> 2;
} }
bool bool

View File

@ -556,7 +556,7 @@ static bool test_heap() {
#define IS_USING_AUTO(arr) \ #define IS_USING_AUTO(arr) \
((uintptr_t) &(arr) < (uintptr_t) arr.Elements() && \ ((uintptr_t) &(arr) < (uintptr_t) arr.Elements() && \
((PRPtrdiff)arr.Elements() - (PRPtrdiff)&arr) <= 16) ((ptrdiff_t)arr.Elements() - (ptrdiff_t)&arr) <= 16)
#define CHECK_IS_USING_AUTO(arr) \ #define CHECK_IS_USING_AUTO(arr) \
do { \ do { \