mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 14:20:59 +00:00
clean up RETURN_EDICT and RETURN_STRING definitions to be both easier to read
and more correct for aliasing (and int size dependence, too:).
This commit is contained in:
parent
ea464d5928
commit
7e14a0fbf3
2 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@
|
|||
#include "msg.h"
|
||||
#include "server.h"
|
||||
|
||||
#define RETURN_EDICT(p,e) (((int *)p->pr_globals)[OFS_RETURN] = EDICT_TO_PROG(p, e))
|
||||
#define RETURN_EDICT(p,e) (p->pr_globals[OFS_RETURN].int_var = EDICT_TO_PROG(p, e))
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
#include "world.h"
|
||||
#include "va.h"
|
||||
|
||||
#define RETURN_EDICT(p, e) (((int *)(p)->pr_globals)[OFS_RETURN] = EDICT_TO_PROG(p, e))
|
||||
#define RETURN_STRING(p, s) (((int *)(p)->pr_globals)[OFS_RETURN] = PR_SetString((p), s))
|
||||
#define RETURN_EDICT(p, e) ((p)->pr_globals[OFS_RETURN].int_var = EDICT_TO_PROG(p, e))
|
||||
#define RETURN_STRING(p, s) ((p)->pr_globals[OFS_RETURN].int_var = PR_SetString((p), s))
|
||||
|
||||
/*
|
||||
BUILT-IN FUNCTIONS
|
||||
|
|
Loading…
Reference in a new issue