From 169dff19d4da8d76e69b8e896aa25b0013639c03 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Wed, 2 Jan 2019 10:41:30 +0100 Subject: modernize loops --- testfiles/src/attributes-test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testfiles/src/attributes-test.cpp') diff --git a/testfiles/src/attributes-test.cpp b/testfiles/src/attributes-test.cpp index 7b3be37bd..ae933611d 100644 --- a/testfiles/src/attributes-test.cpp +++ b/testfiles/src/attributes-test.cpp @@ -548,8 +548,8 @@ std::vector getIdIds() std::vector ids; std::vector all_attrs = getKnownAttrs(); ids.reserve(all_attrs.size()); // minimize memory thrashing - for (AttrItr it(all_attrs.begin()); it != all_attrs.end(); ++it) { - auto id = sp_attribute_lookup(it->attr.c_str()); + for (auto & all_attr : all_attrs) { + auto id = sp_attribute_lookup(all_attr.attr.c_str()); if (id >= ids.size()) { ids.resize(id + 1); } -- cgit v1.2.3