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.24 by root, Mon Dec 25 11:25:49 2006 UTC vs.
Revision 1.25 by root, Sat Dec 30 10:16:10 2006 UTC

6#else 6#else
7# define is_constant(c) 0 7# define is_constant(c) 0
8#endif 8#endif
9 9
10#include <cstddef> 10#include <cstddef>
11#include <new>
12#include <vector>
11 13
12#include <glib.h> 14#include <glib.h>
15
16#include <shstr.h>
17#include <traits.h>
13 18
14// use a gcc extension for auto declarations until ISO C++ sanctifies them 19// use a gcc extension for auto declarations until ISO C++ sanctifies them
15#define AUTODECL(var,expr) typeof(expr) var = (expr) 20#define AUTODECL(var,expr) typeof(expr) var = (expr)
16 21
17// makes dynamically allocated objects zero-initialised 22// makes dynamically allocated objects zero-initialised
191 { 196 {
192 return !strcmp (a, b); 197 return !strcmp (a, b);
193 } 198 }
194}; 199};
195 200
196#include <vector>
197
198template<class obj> 201template<class obj>
199struct unordered_vector : std::vector<obj, slice_allocator<obj> > 202struct unordered_vector : std::vector<obj, slice_allocator<obj> >
200{ 203{
201 typedef typename unordered_vector::iterator iterator; 204 typedef typename unordered_vector::iterator iterator;
202 205
233typedef double tstamp; 236typedef double tstamp;
234 237
235// return current time as timestampe 238// return current time as timestampe
236tstamp now (); 239tstamp now ();
237 240
241int similar_direction (int a, int b);
242
238#endif 243#endif
239 244

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines