ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/util.h
(Generate patch)

Comparing deliantra/server/include/util.h (file contents):
Revision 1.21 by root, Thu Dec 21 06:12:36 2006 UTC vs.
Revision 1.23 by root, Sat Dec 23 16:05:19 2006 UTC

123}; 123};
124 124
125struct refcounted 125struct refcounted
126{ 126{
127 refcounted () : refcnt (0) { } 127 refcounted () : refcnt (0) { }
128// virtual ~refcounted (); 128 virtual ~refcounted ();
129 void refcnt_inc () { ++refcnt; } 129 void refcnt_inc () { ++refcnt; }
130 void refcnt_dec () { --refcnt; } 130 void refcnt_dec () { --refcnt; }
131 bool dead () { return refcnt == 0; } 131 bool dead () { return refcnt == 0; }
132 mutable int refcnt; 132 mutable int refcnt;
133#if 0 133#if 0
165 T &operator * () const { return *p; } 165 T &operator * () const { return *p; }
166 T *operator ->() const { return p; } 166 T *operator ->() const { return p; }
167 167
168 operator T *() const { return p; } 168 operator T *() const { return p; }
169}; 169};
170
171typedef refptr<player> player_ptr;
172typedef refptr<object> object_ptr;
173typedef refptr<archetype> arch_ptr;
170 174
171struct str_hash 175struct str_hash
172{ 176{
173 std::size_t operator ()(const char *s) const 177 std::size_t operator ()(const char *s) const
174 { 178 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines