- InsetList::const_iterator it = par.insetList().begin();
- InsetList::const_iterator end = par.insetList().end();
- for (; it != end; ++it) {
- Inset & inset = *it->inset;
- if (inset.lyxCode() == ARG_CODE) {
+ for (auto const & table : par.insetList())
+ if (InsetArgument const * arg = table.inset->asInsetArgument()) {