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.80 by root, Tue Dec 23 01:51:28 2008 UTC vs.
Revision 1.81 by root, Fri Dec 26 10:36:42 2008 UTC

72#endif 72#endif
73 73
74// use C0X decltype for auto declarations until ISO C++ sanctifies them (if ever) 74// use C0X decltype for auto declarations until ISO C++ sanctifies them (if ever)
75#define auto(var,expr) decltype(expr) var = (expr) 75#define auto(var,expr) decltype(expr) var = (expr)
76 76
77// very ugly macro that basicaly declares and initialises a variable 77// very ugly macro that basically declares and initialises a variable
78// that is in scope for the next statement only 78// that is in scope for the next statement only
79// works only for stuff that can be assigned 0 and converts to false 79// works only for stuff that can be assigned 0 and converts to false
80// (note: works great for pointers) 80// (note: works great for pointers)
81// most ugly macro I ever wrote 81// most ugly macro I ever wrote
82#define statementvar(type, name, value) if (type name = 0) { } else if (((name) = (value)), 1) 82#define statementvar(type, name, value) if (type name = 0) { } else if (((name) = (value)), 1)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines