--- deliantra/server/include/util.h 2006/09/14 00:07:15 1.13 +++ deliantra/server/include/util.h 2006/09/16 13:11:20 1.15 @@ -11,6 +11,9 @@ #include +// use a gcc extension for auto declarations until ISO C++ sanctifies them +#define AUTODECL(var,expr) typeof(expr) var = (expr) + // makes dynamically allocated objects zero-initialised struct zero_initialised { @@ -109,8 +112,7 @@ mutable int refcnt; refcounted () : refcnt (0) { } void refcnt_inc () { ++refcnt; } - void refcnt_dec () { --refcnt; - if (refcnt < 0)abort();}//D + void refcnt_dec () { --refcnt; } }; template