Added a check to debug the total of archived items

This commit is contained in:
smallmodel 2023-11-26 20:31:58 +01:00
parent ecbf7f6caa
commit 0e9d83ee14
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -279,6 +279,7 @@ void con_set<key, value>::Archive(Archiver& arc)
Entry *e;
int hash;
int i;
int total;
arc.ArchiveUnsigned(&tableLength);
arc.ArchiveUnsigned(&threshold);
@ -301,11 +302,15 @@ void con_set<key, value>::Archive(Archiver& arc)
table[hash] = e;
}
} else {
for (i = tableLength - 1; i >= 0; i--) {
total = 0;
for (i = 0; i < tableLength; i++) {
for (e = table[i]; e != NULL; e = e->next) {
e->Archive(arc);
total++;
}
}
assert(total == count);
}
}