diff options
Diffstat (limited to 'src/libexpr/attr-path.cc')
-rw-r--r-- | src/libexpr/attr-path.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libexpr/attr-path.cc b/src/libexpr/attr-path.cc index fdd61a5fd..a4945111e 100644 --- a/src/libexpr/attr-path.cc +++ b/src/libexpr/attr-path.cc @@ -42,11 +42,10 @@ Value * findAlongAttrPath(EvalState & state, const string & attrPath, Value * v = &vIn; - foreach (Strings::iterator, i, tokens) { + for (auto & attr : tokens) { - /* Is *i an index (integer) or a normal attribute name? */ + /* Is i an index (integer) or a normal attribute name? */ enum { apAttr, apIndex } apType = apAttr; - string attr = *i; unsigned int attrIndex; if (string2Int(attr, attrIndex)) apType = apIndex; |