const Armature::Link &Armature::get_link(unsigned index) const
{
- for(list<Link>::const_iterator i=links.begin(); i!=links.end(); ++i)
+ for(vector<Link>::const_iterator i=links.begin(); i!=links.end(); ++i)
if(i->get_index()==index)
return *i;
throw key_error(typeid(list<Link>));
const Armature::Link &Armature::get_link(const string &name) const
{
- for(list<Link>::const_iterator i=links.begin(); i!=links.end(); ++i)
+ for(vector<Link>::const_iterator i=links.begin(); i!=links.end(); ++i)
if(i->get_name()==name)
return *i;
throw key_error(typeid(list<Link>));
unsigned Armature::get_max_link_index() const
{
unsigned max_index = 0;
- for(list<Link>::const_iterator i=links.begin(); i!=links.end(); ++i)
+ for(vector<Link>::const_iterator i=links.begin(); i!=links.end(); ++i)
max_index = max(max_index, i->get_index());
return max_index;
}