… | |
… | |
74 | |
74 | |
75 | const shstr &operator =(const char *str) |
75 | const shstr &operator =(const char *str) |
76 | { |
76 | { |
77 | --refcnt (); |
77 | --refcnt (); |
78 | |
78 | |
79 | #if 0 |
|
|
80 | // this optimises the important case of str == constant 0 |
79 | // this optimises the important case of str == constant 0 |
81 | if (is_constant (str)) |
80 | if (is_constant (str)) |
82 | s = str ? intern (str) : null; |
81 | s = str ? intern (str) : null; |
83 | else |
82 | else |
84 | #endif |
|
|
85 | s = intern (str); |
83 | s = intern (str); |
86 | |
84 | |
87 | return *this; |
85 | return *this; |
88 | } |
86 | } |
89 | }; |
87 | }; |
… | |
… | |
101 | inline bool operator !=(const shstr &a, const shstr &b) |
99 | inline bool operator !=(const shstr &a, const shstr &b) |
102 | { |
100 | { |
103 | return !(a == b); |
101 | return !(a == b); |
104 | } |
102 | } |
105 | |
103 | |
|
|
104 | extern const shstr undead_name; /* Used in hit_player() in main.c */ |
|
|
105 | |
106 | #endif |
106 | #endif |
107 | |
107 | |