1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

more review fixes

This commit is contained in:
petr@mysql.com
2004-10-27 10:21:48 +04:00
parent 73aeeaf4ed
commit 3c33df381f
6 changed files with 41 additions and 50 deletions

View File

@ -226,26 +226,20 @@ int Instance_map::load()
}
Instance *Instance_map::get_instance(uint instance_number)
{
if (instance_number < hash.records)
return (Instance *) hash_element(&hash, instance_number);
else
return NULL;
}
/*--- Implementaton of the Instance map iterator class ---*/
/*--- Implementaton of the Instance map iterator class (Imap_iterator) ---*/
void Imap_iterator::go_to_first()
void Instance_map::Iterator::go_to_first()
{
current_instance=0;
}
Instance *Imap_iterator::next()
Instance *Instance_map::Iterator::next()
{
return instance_map->get_instance(current_instance++);
if (current_instance < instance_map->hash.records)
return (Instance *) hash_element(&instance_map->hash, current_instance++);
else
return NULL;
}