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");
#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));
NS_ABORT_IF_FALSE(diff >= 0 && diff <= 4, "GetAutoArrayBuffer doesn't do what we expect.");
#endif

View File

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

View File

@ -556,7 +556,7 @@ static bool test_heap() {
#define IS_USING_AUTO(arr) \
((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) \
do { \