diff options
author | Haru <haru@dotalux.com> | 2015-12-27 18:17:24 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-01-06 15:14:49 +0100 |
commit | b3c722ecf777aeeea6317755a6adfc0216b7a2bd (patch) | |
tree | c3692ea61faa21307265d7b3e4a09d38854a8d71 /src/map/guild.c | |
parent | aa574e36fea903b9aea31ea6f52855498d9476a9 (diff) | |
download | hercules-b3c722ecf777aeeea6317755a6adfc0216b7a2bd.tar.gz hercules-b3c722ecf777aeeea6317755a6adfc0216b7a2bd.tar.bz2 hercules-b3c722ecf777aeeea6317755a6adfc0216b7a2bd.tar.xz hercules-b3c722ecf777aeeea6317755a6adfc0216b7a2bd.zip |
Replaced some explicit casts with BL_UCAST/BL_UCCAST
- Replaced the map-iterator related casts.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/guild.c')
-rw-r--r-- | src/map/guild.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index ada731bf6..d7dcad58f 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -442,7 +442,7 @@ int guild_check_member(struct guild *g) nullpo_ret(g); iter = mapit_getallusers(); - for (sd = (struct map_session_data *)mapit->first(iter); mapit->exists(iter); sd = (struct map_session_data *)mapit->next(iter)) { + for (sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); sd = BL_UCAST(BL_PC, mapit->next(iter))) { if( sd->status.guild_id != g->guild_id ) continue; @@ -465,7 +465,7 @@ int guild_recv_noinfo(int guild_id) struct s_mapiterator* iter; iter = mapit_getallusers(); - for (sd = (struct map_session_data *)mapit->first(iter); mapit->exists(iter); sd = (struct map_session_data *)mapit->next(iter)) { + for (sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); sd = BL_UCAST(BL_PC, mapit->next(iter))) { if( sd->status.guild_id == guild_id ) sd->status.guild_id = 0; // erase guild } @@ -505,7 +505,7 @@ int guild_recv_info(struct guild *sg) { tg[i] = guild->search(sg->alliance[i].guild_id); } - for (sd = (struct map_session_data *)mapit->first(iter); mapit->exists(iter); sd = (struct map_session_data *)mapit->next(iter)) { + for (sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); sd = BL_UCAST(BL_PC, mapit->next(iter))) { if (!sd->status.guild_id) continue; // Not interested in guildless users @@ -946,7 +946,7 @@ void guild_retrieveitembound(int char_id,int aid,int guild_id) { struct guild_storage *gstor = idb_get(gstorage->db,guild_id); if(gstor && gstor->storage_status == 1) { //Someone is in guild storage, close them struct s_mapiterator* iter = mapit_getallusers(); - for (sd = (struct map_session_data *)mapit->first(iter); mapit->exists(iter); sd = (struct map_session_data *)mapit->next(iter)) { + for (sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); sd = BL_UCAST(BL_PC, mapit->next(iter))) { if(sd->status.guild_id == guild_id && sd->state.storage_flag == STORAGE_FLAG_GUILD) { gstorage->close(sd); break; |