X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fanimation%2Farmature.cpp;h=d8512d82143c1efe92cc9207033ae67acd485a33;hb=3867df2040d1fb955158ca3bd8fbf5271ad66fb2;hp=6e921e3f8e9ea95246b8dae655ba54f701d0689d;hpb=7aaec9a70b8d7733429bec043f8e33e02956f266;p=libs%2Fgl.git
diff --git a/source/animation/armature.cpp b/source/animation/armature.cpp
index 6e921e3f..d8512d82 100644
--- a/source/animation/armature.cpp
+++ b/source/animation/armature.cpp
@@ -14,25 +14,25 @@ Armature::Link &Armature::add_link()
const Armature::Link &Armature::get_link(unsigned index) const
{
- for(vector::const_iterator i=links.begin(); i!=links.end(); ++i)
- if(i->get_index()==index)
- return *i;
- throw key_error(typeid(list));
+ for(const Link &l: links)
+ if(l.get_index()==index)
+ return l;
+ throw key_error(index);
}
const Armature::Link &Armature::get_link(const string &name) const
{
- for(vector::const_iterator i=links.begin(); i!=links.end(); ++i)
- if(i->get_name()==name)
- return *i;
- throw key_error(typeid(list));
+ for(const Link &l: links)
+ if(l.get_name()==name)
+ return l;
+ throw key_error(name);
}
unsigned Armature::get_max_link_index() const
{
unsigned max_index = 0;
- for(vector::const_iterator i=links.begin(); i!=links.end(); ++i)
- max_index = max(max_index, i->get_index());
+ for(const Link &l: links)
+ max_index = max(max_index, l.get_index());
return max_index;
}