1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 12:41:15 +02:00

Refactor: rename C++ concatStringsSep -> dropEmptyInitThenConcatStringsSep

This commit is contained in:
Robert Hensing 2024-07-12 22:09:27 +02:00
parent b1effc9649
commit 1a8defd06f
33 changed files with 70 additions and 70 deletions

View file

@ -47,7 +47,7 @@ void ConfigFile::apply(const Settings & flakeSettings)
else if (auto* b = std::get_if<Explicit<bool>>(&value))
valueS = b->t ? "true" : "false";
else if (auto ss = std::get_if<std::vector<std::string>>(&value))
valueS = concatStringsSep(" ", *ss); // FIXME: evil
valueS = dropEmptyInitThenConcatStringsSep(" ", *ss); // FIXME: evil
else
assert(false);

View file

@ -61,7 +61,7 @@ static std::shared_ptr<Node> doFind(const ref<Node>& root, const InputPath & pat
std::vector<std::string> cycle;
std::transform(found, visited.cend(), std::back_inserter(cycle), printInputPath);
cycle.push_back(printInputPath(path));
throw Error("follow cycle detected: [%s]", concatStringsSep(" -> ", cycle));
throw Error("follow cycle detected: [%s]", dropEmptyInitThenConcatStringsSep(" -> ", cycle));
}
visited.push_back(path);
@ -367,7 +367,7 @@ void check();
std::string printInputPath(const InputPath & path)
{
return concatStringsSep("/", path);
return dropEmptyInitThenConcatStringsSep("/", path);
}
}