summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-05-02 21:22:20 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-05-02 21:22:20 +0000
commite7e5d3d478f97a7015f6c4334d7d5258461af037 (patch)
tree6edf9dafcdc2998500118c27a3ff8d2d0c2e378f /src
parent007926f449df5385122279348361d4b8bc680ad9 (diff)
downloadhercules-e7e5d3d478f97a7015f6c4334d7d5258461af037.tar.gz
hercules-e7e5d3d478f97a7015f6c4334d7d5258461af037.tar.bz2
hercules-e7e5d3d478f97a7015f6c4334d7d5258461af037.tar.xz
hercules-e7e5d3d478f97a7015f6c4334d7d5258461af037.zip
* Fixed missing iterator destruction in the map_foreach* functions (followup to r12684).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12686 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/map.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/map.c b/src/map/map.c
index fc9b41fde..79f72caac 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1746,7 +1746,7 @@ void map_foreachpc(int (*func)(struct map_session_data* sd, va_list args), ...)
DBIterator* iter;
struct map_session_data* sd;
- iter = pc_db->iterator(pc_db);
+ 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) )
{
va_list args;
@@ -1758,7 +1758,7 @@ void map_foreachpc(int (*func)(struct map_session_data* sd, va_list args), ...)
if( ret == -1 )
break;// stop iterating
}
- iter->destroy(iter);
+ dbi_destroy(iter);
}
/// Applies func to all the mobs in the db.
@@ -1780,6 +1780,7 @@ void map_foreachmob(int (*func)(struct mob_data* md, va_list args), ...)
if( ret == -1 )
break;// stop iterating
}
+ dbi_destroy(iter);
}
/// Applies func to all the npcs in the db.
@@ -1805,6 +1806,7 @@ void map_foreachnpc(int (*func)(struct npc_data* nd, va_list args), ...)
break;// stop iterating
}
}
+ dbi_destroy(iter);
}
/// Applies func to everything in the db.
@@ -1826,6 +1828,7 @@ void map_foreachiddb(int (*func)(struct block_list* bl, va_list args), ...)
if( ret == -1 )
break;// stop iterating
}
+ dbi_destroy(iter);
}
/// Iterator.