more review fixes

server-tools/instance-manager/command.cc:
  member rename
server-tools/instance-manager/commands.cc:
  rename
server-tools/instance-manager/commands.h:
  member rename
server-tools/instance-manager/guardian.cc:
  guardian fixed to use Instance_map::Iterator intead of Imap
server-tools/instance-manager/instance_map.cc:
  removed get_instance method from Instance_map as it is needed only by
  Iterator which is made a friend class
server-tools/instance-manager/instance_map.h:
  use Instance_map::Iterator instead if Imap_iterator (no need to add more
  names to the global namespace)
This commit is contained in:
unknown 2004-10-27 10:21:48 +04:00
commit d97e8686f1
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;
}