Mercurial > hg > early-roguelike
comparison arogue7/sticks.c @ 200:1cd604c827a3
Advanced Rogue 7: initialize multiple variables.
MSVC complained that they might be used uninitialized. In some cases,
this might have been possible.
XRogue already has initializations for all these variables.
author | John "Elwin" Edwards |
---|---|
date | Wed, 12 Aug 2015 15:42:02 -0400 |
parents | b786053d2f37 |
children | f9ef86cf22b2 |
comparison
equal
deleted
inserted
replaced
199:efdbeec0816d | 200:1cd604c827a3 |
---|---|
31 struct object *obj; | 31 struct object *obj; |
32 coord *direction; | 32 coord *direction; |
33 int which; | 33 int which; |
34 int flags; | 34 int flags; |
35 { | 35 { |
36 register struct linked_list *item; | 36 register struct linked_list *item = NULL; |
37 register struct thing *tp; | 37 register struct thing *tp; |
38 register int y, x, bonus; | 38 register int y, x, bonus; |
39 struct linked_list *nitem; | 39 struct linked_list *nitem; |
40 struct object *nobj; | 40 struct object *nobj; |
41 bool cursed, blessed, is_player; | 41 bool cursed, blessed, is_player; |
42 char *mname; | 42 char *mname = ""; |
43 | 43 |
44 cursed = flags & ISCURSED; | 44 cursed = flags & ISCURSED; |
45 blessed = flags & ISBLESSED; | 45 blessed = flags & ISBLESSED; |
46 | 46 |
47 if (obj && obj->o_type != RELIC) { /* all relics are chargeless */ | 47 if (obj && obj->o_type != RELIC) { /* all relics are chargeless */ |