ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/utils.C
(Generate patch)

Comparing deliantra/server/common/utils.C (file contents):
Revision 1.4 by root, Mon Sep 4 11:07:59 2006 UTC vs.
Revision 1.6 by root, Fri Sep 8 16:51:43 2006 UTC

1/* 1/*
2 * static char *rcsid_utils_c = 2 * static char *rcsid_utils_c =
3 * "$Id: utils.C,v 1.4 2006/09/04 11:07:59 root Exp $"; 3 * "$Id: utils.C,v 1.6 2006/09/08 16:51:43 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
304 304
305/* set the materialname and type for an item */ 305/* set the materialname and type for an item */
306void set_materialname(object *op, int difficulty, materialtype_t *nmt) 306void set_materialname(object *op, int difficulty, materialtype_t *nmt)
307{ 307{
308 materialtype_t *mt, *lmt; 308 materialtype_t *mt, *lmt;
309#ifdef NEW_MATERIAL_CODE
309 int j; 310 int j;
311#endif
310 312
311 if (op->materialname != NULL) 313 if (op->materialname != NULL)
312 return; 314 return;
313 315
314 316
487 489
488//TODO: overhead due to specifying size twice 490//TODO: overhead due to specifying size twice
489void * 491void *
490zero_initialised::operator new (size_t s) 492zero_initialised::operator new (size_t s)
491{ 493{
494printf ("new(%d)\n", s);//D
492 return g_slice_alloc0 (s); 495 return g_slice_alloc0 (s);
493} 496}
494 497
495void * 498void *
496zero_initialised::operator new [] (size_t s) 499zero_initialised::operator new [] (size_t s)
497{ 500{
501printf ("new[](%d)\n", s);//D
498 return g_slice_alloc0 (s); 502 return g_slice_alloc0 (s);
499} 503}
500 504
501void 505void
502zero_initialised::operator delete (void *p, size_t s) 506zero_initialised::operator delete (void *p, size_t s)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines