Use enumerate()
This commit is contained in:
parent
ea756b3654
commit
555940f065
1 changed files with 3 additions and 2 deletions
|
@ -58,7 +58,7 @@ struct CmdBuild : InstallablesCommand, MixDryRun, MixJSON, MixProfile
|
||||||
|
|
||||||
if (outLink != "")
|
if (outLink != "")
|
||||||
if (auto store2 = store.dynamic_pointer_cast<LocalFSStore>())
|
if (auto store2 = store.dynamic_pointer_cast<LocalFSStore>())
|
||||||
for (size_t i = 0; i < buildables.size(); ++i)
|
for (const auto & [i, buildable] : enumerate(buildables)) {
|
||||||
std::visit(overloaded {
|
std::visit(overloaded {
|
||||||
[&](BuildableOpaque bo) {
|
[&](BuildableOpaque bo) {
|
||||||
std::string symlink = outLink;
|
std::string symlink = outLink;
|
||||||
|
@ -74,7 +74,8 @@ struct CmdBuild : InstallablesCommand, MixDryRun, MixJSON, MixProfile
|
||||||
store2->addPermRoot(output.second, absPath(symlink));
|
store2->addPermRoot(output.second, absPath(symlink));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}, buildables[i]);
|
}, buildable);
|
||||||
|
}
|
||||||
|
|
||||||
updateProfile(buildables);
|
updateProfile(buildables);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue