]> git.tdb.fi Git - libs/gl.git/blobdiff - source/armature.cpp
Use vector when there's no reason to use some other container
[libs/gl.git] / source / armature.cpp
index 887d974a025a59827f83ed21219b58e2f5b79f4b..6e921e3f8e9ea95246b8dae655ba54f701d0689d 100644 (file)
@@ -14,7 +14,7 @@ Armature::Link &Armature::add_link()
 
 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>));
@@ -22,7 +22,7 @@ const Armature::Link &Armature::get_link(unsigned index) const
 
 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>));
@@ -31,7 +31,7 @@ const Armature::Link &Armature::get_link(const string &name) const
 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;
 }