projects
/
rrq
/
rrqmisc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0396bd0
)
correction for deleting items
author
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Sat, 25 Jun 2022 22:53:40 +0000
(08:53 +1000)
committer
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Sat, 25 Jun 2022 22:53:40 +0000
(08:53 +1000)
pvector/hashvector.c
patch
|
blob
|
history
diff --git
a/pvector/hashvector.c
b/pvector/hashvector.c
index 5164ffe2e209291388fafcbf812ae57940ed7233..11fdae845a9837e04e46ebc2450b433078af0ed0 100644
(file)
--- a/
pvector/hashvector.c
+++ b/
pvector/hashvector.c
@@
-105,8
+105,9
@@
int hashvector_delete(hashvector *hv,void *item) {
}
*p = HV_HOLE;
hv->holes++;
+ hv->fill--;
if ( hv->table.size > 256 ) {
- if ( hv->fill < hv->table.size /
2
) {
+ if ( hv->fill < hv->table.size /
4
) {
hashvector_resize( hv, hv->table.size / 2 );
}
}