From 72222a022cd459750be338bac288d9c70719d0f4 Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Fri, 8 Feb 2019 12:13:23 +0900 Subject: [PATCH] Bug 1524755 - Use ptrdiff_t instead in RangedPtr. r=jwalden --- mfbt/RangedPtr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mfbt/RangedPtr.h b/mfbt/RangedPtr.h index 436c1bd50409..a0db2eb78ddc 100644 --- a/mfbt/RangedPtr.h +++ b/mfbt/RangedPtr.h @@ -211,7 +211,7 @@ class RangedPtr { 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); }