diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /xpcom/base/EnumeratedArrayCycleCollection.h | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xpcom/base/EnumeratedArrayCycleCollection.h')
-rw-r--r-- | xpcom/base/EnumeratedArrayCycleCollection.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xpcom/base/EnumeratedArrayCycleCollection.h b/xpcom/base/EnumeratedArrayCycleCollection.h index 465d4cf38a..863b990de7 100644 --- a/xpcom/base/EnumeratedArrayCycleCollection.h +++ b/xpcom/base/EnumeratedArrayCycleCollection.h @@ -10,21 +10,21 @@ #include "mozilla/EnumeratedArray.h" #include "nsCycleCollectionTraversalCallback.h" -template <typename IndexType, IndexType SizeAsEnumValue, typename ValueType> +template <typename IndexType, typename ValueType, size_t Size> inline void ImplCycleCollectionUnlink( - mozilla::EnumeratedArray<IndexType, SizeAsEnumValue, ValueType>& aField) { - for (size_t i = 0; i < size_t(SizeAsEnumValue); ++i) { + mozilla::EnumeratedArray<IndexType, ValueType, Size>& aField) { + for (size_t i = 0; i < Size; ++i) { aField[IndexType(i)] = nullptr; } } -template <typename IndexType, IndexType SizeAsEnumValue, typename ValueType> +template <typename IndexType, typename ValueType, size_t Size> inline void ImplCycleCollectionTraverse( nsCycleCollectionTraversalCallback& aCallback, - mozilla::EnumeratedArray<IndexType, SizeAsEnumValue, ValueType>& aField, + mozilla::EnumeratedArray<IndexType, ValueType, Size>& aField, const char* aName, uint32_t aFlags = 0) { aFlags |= CycleCollectionEdgeNameArrayFlag; - for (size_t i = 0; i < size_t(SizeAsEnumValue); ++i) { + for (size_t i = 0; i < Size; ++i) { ImplCycleCollectionTraverse(aCallback, aField[IndexType(i)], aName, aFlags); } } |