… | … | ||
---|---|---|---|
101 | 101 | ||
102 | if (i == ht.end ()) | 102 | if (i == ht.end ()) |
103 | i = ht.begin (); | 103 | i = ht.begin (); |
104 | 104 | ||
105 | // go through all strings roughly once every 4 minutes | 105 | // go through all strings roughly once every 4 minutes |
106 | for (int n = ht.size () / 256 + 16; --n; ) | 106 | int n = ht.size () / 256 + 16; |
107 | |||
108 | for (;;) | ||
107 | { | 109 | { |
108 | if (i == ht.end ()) | 110 | if (i == ht.end ()) |
109 | { | 111 | { |
110 | curpos = 0; | 112 | curpos = 0; |
111 | return; | 113 | return; |
112 | } | 114 | } |
113 | 115 | else if (!--n) | |
116 | break; | ||
114 | if (!refcnt (*i)) | 117 | else if (!refcnt (*i)) |
115 | { | 118 | { |
116 | HT::iterator o = i++; | 119 | HT::iterator o = i++; |
117 | const char *s = *o; | 120 | const char *s = *o; |
118 | ht.erase (o); | 121 | ht.erase (o); |
119 | 122 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |