forked from lix-project/lix
Just use auto
in two places.
This commit is contained in:
parent
e6f8ae56d8
commit
57d0432b39
|
@ -90,10 +90,10 @@ template<typename G>
|
||||||
static void removeGoal(std::shared_ptr<G> goal, std::map<StorePath, std::weak_ptr<G>> & goalMap)
|
static void removeGoal(std::shared_ptr<G> goal, std::map<StorePath, std::weak_ptr<G>> & goalMap)
|
||||||
{
|
{
|
||||||
/* !!! inefficient */
|
/* !!! inefficient */
|
||||||
for (typename std::map<StorePath, std::weak_ptr<G>>::iterator i = goalMap.begin();
|
for (auto i = goalMap.begin();
|
||||||
i != goalMap.end(); )
|
i != goalMap.end(); )
|
||||||
if (i->second.lock() == goal) {
|
if (i->second.lock() == goal) {
|
||||||
typename std::map<StorePath, std::weak_ptr<G>>::iterator j = i; ++j;
|
auto j = i; ++j;
|
||||||
goalMap.erase(i);
|
goalMap.erase(i);
|
||||||
i = j;
|
i = j;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue