From ecb1524f8da7901338b263384fed3c612f117b4c Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:22:36 +0200 Subject: 5.11 --- ui/custom_grid.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'ui/custom_grid.cpp') diff --git a/ui/custom_grid.cpp b/ui/custom_grid.cpp index 975dca5a..ffa0a9bc 100644 --- a/ui/custom_grid.cpp +++ b/ui/custom_grid.cpp @@ -715,24 +715,24 @@ private: { if (dynamic_cast(fsObj) || dynamic_cast(fsObj)) { - for (auto iter = markedFiles_.begin(); iter != markedFiles_.end(); ++iter) - if (*iter == &(fsObj->parent())) //mark files/links wich have the given parent + for (auto it = markedFiles_.begin(); it != markedFiles_.end(); ++it) + if (*it == &(fsObj->parent())) //mark files/links wich have the given parent return true; } else if (auto dirObj = dynamic_cast(fsObj)) { - for (auto iter = markedContainer_.begin(); iter != markedContainer_.end(); ++iter) - if (*iter == dirObj) //mark directories which *are* the given HierarchyObject* + for (auto it = markedContainer_.begin(); it != markedContainer_.end(); ++it) + if (*it == dirObj) //mark directories which *are* the given HierarchyObject* return true; } - for (auto iter = markedContainer_.begin(); iter != markedContainer_.end(); ++iter) + for (auto it = markedContainer_.begin(); it != markedContainer_.end(); ++it) { //mark all objects which have the HierarchyObject as *any* matching ancestor const HierarchyObject* parent = &(fsObj->parent()); for (;;) { - if (*iter == parent) + if (*it == parent) return true; if (auto dirObj = dynamic_cast(parent)) @@ -1336,10 +1336,10 @@ private: { //find stretch factor of resized column: type is unique due to makeConsistent()! std::vector cfgSrc = src.getColumnConfig(); - auto iter = std::find_if(cfgSrc.begin(), cfgSrc.end(), [&](Grid::ColumnAttribute& ca) { return ca.type_ == type; }); - if (iter == cfgSrc.end()) + auto it = std::find_if(cfgSrc.begin(), cfgSrc.end(), [&](Grid::ColumnAttribute& ca) { return ca.type_ == type; }); + if (it == cfgSrc.end()) return; - const ptrdiff_t stretchSrc = iter->stretch_; + const ptrdiff_t stretchSrc = it->stretch_; //we do not propagate resizings on stretched columns to the other side: awkward user experience if (stretchSrc > 0) @@ -1492,7 +1492,7 @@ std::vector makeConsistent(const std::vector usedTypes; std::vector output; - //remove duplicates + //remove duplicates: required by GridEventManager::resizeOtherSide() to find corresponding column on other side std::copy_if(attribs.begin(), attribs.end(), std::back_inserter(output), [&](const ColumnAttributeRim& a) { return usedTypes.insert(a.type_).second; }); -- cgit