Browse Source

Use ptrdiff_t in RangedPtr.

pull/7/head
wolfbeast 3 years ago committed by Roy Tam
parent
commit
a4dd5cc088
  1. 2
      mfbt/RangedPtr.h

2
mfbt/RangedPtr.h

@ -212,7 +212,7 @@ public:
return *this;
}
T& operator[](int aIndex) const
T& operator[](ptrdiff_t aIndex) const
{
MOZ_ASSERT(size_t(aIndex > 0 ? aIndex : -aIndex) <= size_t(-1) / sizeof(T));
return *create(mPtr + aIndex);

Loading…
Cancel
Save