… | |
… | |
43 | shstr::null = makevec ("<nil>"); |
43 | shstr::null = makevec ("<nil>"); |
44 | |
44 | |
45 | // what weird misoptimisation is this again? |
45 | // what weird misoptimisation is this again? |
46 | const shstr undead_name ("undead"); |
46 | const shstr undead_name ("undead"); |
47 | |
47 | |
|
|
48 | shstr skill_names[NUM_SKILLS]; |
|
|
49 | |
48 | const char * |
50 | const char * |
49 | shstr::find (const char *s) |
51 | shstr::find (const char *s) |
50 | { |
52 | { |
51 | if (!s) |
53 | if (!s) |
52 | return s; |
54 | return s; |
… | |
… | |
76 | // periodically test refcounts == 0 for a few strings |
78 | // periodically test refcounts == 0 for a few strings |
77 | // this is the ONLY thing that erases stuff from ht. keep it that way. |
79 | // this is the ONLY thing that erases stuff from ht. keep it that way. |
78 | void |
80 | void |
79 | shstr::gc () |
81 | shstr::gc () |
80 | { |
82 | { |
|
|
83 | return; //D |
|
|
84 | //D currently disabled: some datastructures might still store them |
|
|
85 | //D but their pointers will become invalidated |
81 | static const char *curpos; |
86 | static const char *curpos; |
82 | |
87 | |
83 | HT::iterator i = curpos ? ht.find (curpos) : ht.begin (); |
88 | HT::iterator i = curpos ? ht.find (curpos) : ht.begin (); |
84 | |
89 | |
85 | if (i == ht.end ()) |
90 | if (i == ht.end ()) |