diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2012-11-30 15:43:12 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2012-12-05 15:02:46 -0800 |
commit | 266f7b4ac45f546e55774ccba57b0ed2525d1eb2 (patch) | |
tree | b865e1800a243348559529c3c71c845153d0ce13 /src/map/clif.cpp | |
parent | 0ea504c7b77c7d2e3efabc4678fcd396fbeec083 (diff) | |
download | tmwa-266f7b4ac45f546e55774ccba57b0ed2525d1eb2.tar.gz tmwa-266f7b4ac45f546e55774ccba57b0ed2525d1eb2.tar.bz2 tmwa-266f7b4ac45f546e55774ccba57b0ed2525d1eb2.tar.xz tmwa-266f7b4ac45f546e55774ccba57b0ed2525d1eb2.zip |
Change some unused int returns to void
Also clean up a little formatting in script.cpp
This is what passes for "minimally invasive" in tmwa ...
Diffstat (limited to 'src/map/clif.cpp')
-rw-r--r-- | src/map/clif.cpp | 64 |
1 files changed, 27 insertions, 37 deletions
diff --git a/src/map/clif.cpp b/src/map/clif.cpp index fd22160..69c913e 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -233,7 +233,7 @@ static char *clif_validate_chat (struct map_session_data *sd, int type, *------------------------------------------ */ static -int clif_send_sub (struct block_list *bl, va_list ap) +void clif_send_sub (struct block_list *bl, va_list ap) { unsigned char *buf; int len; @@ -241,20 +241,20 @@ int clif_send_sub (struct block_list *bl, va_list ap) int type; struct map_session_data *sd; - nullpo_retr (0, bl); - nullpo_retr (0, ap); - nullpo_retr (0, sd = (struct map_session_data *) bl); + nullpo_retv (bl); + nullpo_retv (ap); + nullpo_retv (sd = (struct map_session_data *) bl); buf = va_arg (ap, unsigned char *); len = va_arg (ap, int); - nullpo_retr (0, src_bl = va_arg (ap, struct block_list *)); + nullpo_retv (src_bl = va_arg (ap, struct block_list *)); type = va_arg (ap, int); switch (type) { case AREA_WOS: if (bl && bl == src_bl) - return 0; + return; break; case AREA_CHAT_WOC: @@ -263,18 +263,18 @@ int clif_send_sub (struct block_list *bl, va_list ap) && pc_isGM ((struct map_session_data *) src_bl))) { clif_emotion_towards (src_bl, bl, EMOTE_IGNORED); - return 0; + return; } /* fall through... */ case AREA_WOC: if ((sd && sd->chatID) || (bl && bl == src_bl)) - return 0; + return; break; case AREA_WOSC: if ((sd) && sd->chatID && sd->chatID == ((struct map_session_data *) src_bl)->chatID) - return 0; + return; break; } @@ -298,8 +298,6 @@ int clif_send_sub (struct block_list *bl, va_list ap) } } } - - return 0; } /*========================================== @@ -3932,12 +3930,12 @@ int clif_01ac (struct block_list *bl) *------------------------------------------ */ static -int clif_getareachar (struct block_list *bl, va_list ap) +void clif_getareachar (struct block_list *bl, va_list ap) { struct map_session_data *sd; - nullpo_retr (0, bl); - nullpo_retr (0, ap); + nullpo_retv (bl); + nullpo_retv (ap); sd = va_arg (ap, struct map_session_data *); @@ -3965,20 +3963,19 @@ int clif_getareachar (struct block_list *bl, va_list ap) printf ("get area char ??? %d\n", bl->type); break; } - return 0; } /*========================================== * *------------------------------------------ */ -int clif_pcoutsight (struct block_list *bl, va_list ap) +void clif_pcoutsight (struct block_list *bl, va_list ap) { struct map_session_data *sd, *dstsd; - nullpo_retr (0, bl); - nullpo_retr (0, ap); - nullpo_retr (0, sd = va_arg (ap, struct map_session_data *)); + nullpo_retv (bl); + nullpo_retv (ap); + nullpo_retv (sd = va_arg (ap, struct map_session_data *)); switch (bl->type) { @@ -4011,20 +4008,19 @@ int clif_pcoutsight (struct block_list *bl, va_list ap) clif_clearchar_skillunit ((struct skill_unit *) bl, sd->fd); break; } - return 0; } /*========================================== * *------------------------------------------ */ -int clif_pcinsight (struct block_list *bl, va_list ap) +void clif_pcinsight (struct block_list *bl, va_list ap) { struct map_session_data *sd, *dstsd; - nullpo_retr (0, bl); - nullpo_retr (0, ap); - nullpo_retr (0, sd = va_arg (ap, struct map_session_data *)); + nullpo_retv (bl); + nullpo_retv (ap); + nullpo_retv (sd = va_arg (ap, struct map_session_data *)); switch (bl->type) { @@ -4049,50 +4045,44 @@ int clif_pcinsight (struct block_list *bl, va_list ap) clif_getareachar_skillunit (sd, (struct skill_unit *) bl); break; } - - return 0; } /*========================================== * *------------------------------------------ */ -int clif_moboutsight (struct block_list *bl, va_list ap) +void clif_moboutsight (struct block_list *bl, va_list ap) { struct map_session_data *sd; struct mob_data *md; - nullpo_retr (0, bl); - nullpo_retr (0, ap); - nullpo_retr (0, md = va_arg (ap, struct mob_data *)); + nullpo_retv (bl); + nullpo_retv (ap); + nullpo_retv (md = va_arg (ap, struct mob_data *)); if (bl->type == BL_PC && (sd = (struct map_session_data *) bl)) { clif_clearchar_id (md->bl.id, 0, sd->fd); } - - return 0; } /*========================================== * *------------------------------------------ */ -int clif_mobinsight (struct block_list *bl, va_list ap) +void clif_mobinsight (struct block_list *bl, va_list ap) { struct map_session_data *sd; struct mob_data *md; - nullpo_retr (0, bl); - nullpo_retr (0, ap); + nullpo_retv (bl); + nullpo_retv (ap); md = va_arg (ap, struct mob_data *); if (bl->type == BL_PC && (sd = (struct map_session_data *) bl)) { clif_getareachar_mob (sd, md); } - - return 0; } /*========================================== |