mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
GitRepo::fetch(): Cleanup
(cherry picked from commit bd10b859f7
)
# Conflicts:
# src/libfetchers/git-utils.cc
This commit is contained in:
parent
532092a812
commit
4511c47ab7
2 changed files with 17 additions and 8 deletions
|
@ -295,6 +295,17 @@ std::optional<typename T::value_type> pop(T & c)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Append items to a container. TODO: remove this once we can use
|
||||
* C++23's `append_range()`.
|
||||
*/
|
||||
template<class C, typename T>
|
||||
void append(C & c, std::initializer_list<T> l)
|
||||
{
|
||||
c.insert(c.end(), l.begin(), l.end());
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
class Callback;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue