- vector<docstring> const xrefs = getXRefs(data);
- if (!xrefs.empty()) {
- vector<docstring>::const_iterator it = xrefs.begin();
- vector<docstring>::const_iterator en = xrefs.end();
- for (; it != en; ++it) {
- BiblioInfo::const_iterator const xrefit = find(*it);
- if (xrefit != end())
- xrefptrs.push_back(&(xrefit->second));
- }
+ for (docstring const & xref : getXRefs(data)) {
+ BiblioInfo::const_iterator const xrefit = find(xref);
+ if (xrefit != end())
+ xrefptrs.push_back(&(xrefit->second));