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/guild.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/guild.c')
-rw-r--r-- | src/map/guild.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index 70f5361bb..deb603473 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -187,14 +187,14 @@ struct guild* guild_search(int guild_id) struct guild* guild_searchname(char* str) { struct guild* g; + DBIterator *iter = db_iterator(guild_db); - DBIterator* iter = guild_db->iterator(guild_db); - for( g = (struct guild*)iter->first(iter,NULL); iter->exists(iter); g = (struct guild*)iter->next(iter,NULL) ) + for( g = dbi_first(iter); dbi_exists(iter); g = dbi_next(iter) ) { if( strcmpi(g->name, str) == 0 ) break; } - iter->destroy(iter); + dbi_destroy(iter); return g; } @@ -209,14 +209,14 @@ struct guild_castle* guild_castle_search(int gcid) struct guild_castle* guild_mapindex2gc(short mapindex) { struct guild_castle* gc; + DBIterator *iter = db_iterator(castle_db); - DBIterator* iter = castle_db->iterator(castle_db); - for( gc = (struct guild_castle*)iter->first(iter,NULL); iter->exists(iter); gc = (struct guild_castle*)iter->next(iter,NULL) ) + for( gc = dbi_first(iter); dbi_exists(iter); gc = dbi_next(iter) ) { if( gc->mapindex == mapindex ) break; } - iter->destroy(iter); + dbi_destroy(iter); return gc; } |