diff options
author | gepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-09 14:31:15 +0000 |
---|---|---|
committer | gepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-09 14:31:15 +0000 |
commit | 33369a948f2d6ba2059f81816ea7b16e486090ba (patch) | |
tree | b08a112ecbacf193f3a98c2bcc05a01fddef5feb /src/map/map.c | |
parent | 440542802577e5f3f67081803873bc87642a3f48 (diff) | |
download | hercules-33369a948f2d6ba2059f81816ea7b16e486090ba.tar.gz hercules-33369a948f2d6ba2059f81816ea7b16e486090ba.tar.bz2 hercules-33369a948f2d6ba2059f81816ea7b16e486090ba.tar.xz hercules-33369a948f2d6ba2059f81816ea7b16e486090ba.zip |
Code cleanup: replaced `DBIterator` function calls with macros where possible.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15668 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/map/map.c b/src/map/map.c index eab54353a..73a9445ef 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1876,7 +1876,7 @@ void map_foreachpc(int (*func)(struct map_session_data* sd, va_list args), ...) struct map_session_data* sd; iter = db_iterator(pc_db); - for( sd = (struct map_session_data*)iter->first(iter,NULL); iter->exists(iter); sd = (struct map_session_data*)iter->next(iter,NULL) ) + for( sd = dbi_first(iter); dbi_exists(iter); sd = dbi_next(iter) ) { va_list args; int ret; @@ -2619,15 +2619,14 @@ void map_iwall_get(struct map_session_data *sd) { struct iwall_data *iwall; DBIterator* iter; - DBKey key; int x1, y1; int i; if( map[sd->bl.m].iwall_num < 1 ) return; - iter = iwall_db->iterator(iwall_db); - for( iwall = (struct iwall_data *)iter->first(iter,&key); iter->exists(iter); iwall = (struct iwall_data *)iter->next(iter,&key) ) + iter = db_iterator(iwall_db); + for( iwall = dbi_first(iter); dbi_exists(iter); iwall = dbi_next(iter) ) { if( iwall->m != sd->bl.m ) continue; @@ -2638,7 +2637,7 @@ void map_iwall_get(struct map_session_data *sd) clif_changemapcell(sd->fd, iwall->m, x1, y1, map_getcell(iwall->m, x1, y1, CELL_GETTYPE), SELF); } } - iter->destroy(iter); + dbi_destroy(iter); } void map_iwall_remove(const char *wall_name) |