summaryrefslogtreecommitdiffstats
path: root/xpcom/base/EnumeratedArrayCycleCollection.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /xpcom/base/EnumeratedArrayCycleCollection.h
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 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.h12
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);
}
}