ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/shstr.C
(Generate patch)

Comparing deliantra/server/common/shstr.C (file contents):
Revision 1.5 by root, Sun Sep 3 09:00:05 2006 UTC vs.
Revision 1.6 by root, Sun Sep 3 11:37:25 2006 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines