From 86cd5daff68e674c5b3c770e143c00b79a3b6c24 Mon Sep 17 00:00:00 2001 From: Randell Jesup Date: Sun, 27 Apr 2014 00:29:18 -0400 Subject: [PATCH] Bug 940329: avoid warnings from using size_t in ImplCycleCollectionTraverse() r=ehsan --- xpcom/glue/nsTArray.h | 4 ++-- xpcom/glue/nsTObserverArray.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xpcom/glue/nsTArray.h b/xpcom/glue/nsTArray.h index 25a1ce65bbc..0323b0ce6bf 100644 --- a/xpcom/glue/nsTArray.h +++ b/xpcom/glue/nsTArray.h @@ -1644,8 +1644,8 @@ ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags = 0) { aFlags |= CycleCollectionEdgeNameArrayFlag; - size_t length = aField.Length(); - for (size_t i = 0; i < length; ++i) { + uint32_t length = aField.Length(); + for (uint32_t i = 0; i < length; ++i) { ImplCycleCollectionTraverse(aCallback, aField[i], aName, aFlags); } } diff --git a/xpcom/glue/nsTObserverArray.h b/xpcom/glue/nsTObserverArray.h index 92dc9d0e13f..c5faeaa63a5 100644 --- a/xpcom/glue/nsTObserverArray.h +++ b/xpcom/glue/nsTObserverArray.h @@ -386,8 +386,8 @@ ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags = 0) { aFlags |= CycleCollectionEdgeNameArrayFlag; - size_t length = aField.Length(); - for (size_t i = 0; i < length; ++i) { + uint32_t length = aField.Length(); + for (uint32_t i = 0; i < length; ++i) { ImplCycleCollectionTraverse(aCallback, aField.ElementAt(i), aName, aFlags); } }