mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-27 19:41:50 +02:00
daemon: Remove ‘singleton’ and replace ‘typedef’ with ‘using’ in ‘types.hh’
* nix/libutil/util.hh (singleton): Remove. * nix/libstore/build.cc (DerivationGoal::startBuilder) (SubstitutionGoal::tryNext, SubstitutionGoal::tryToRun) (LocalStore::ensurePath, LocalStore::repairPath): Use normal construction function instead of ‘singleton’. * nix/libstore/local-store.cc (LocalStore::addToStoreFromDump) (LocalStore::addTextToStore, LocalStore::importPath): Likewise. * nix/nix-daemon/nix-daemon.cc (performOp): Likewise. Change-Id: If0d929407c09482f3b506a1c51dfda70e29696dd Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
committed by
Ludovic Courtès
parent
8a6cf4fad6
commit
4b9d14378f
@@ -76,24 +76,24 @@ public:
|
||||
};
|
||||
|
||||
|
||||
typedef list<string> Strings;
|
||||
typedef set<string> StringSet;
|
||||
using Strings = std::list<std::string>;
|
||||
using StringSet = std::set<std::string>;
|
||||
|
||||
|
||||
/* Paths are just strings. */
|
||||
typedef string Path;
|
||||
typedef list<Path> Paths;
|
||||
typedef set<Path> PathSet;
|
||||
using Path = std::string;
|
||||
using Paths = std::list<Path>;
|
||||
using PathSet = std::set<Path>;
|
||||
|
||||
|
||||
typedef enum {
|
||||
enum Verbosity {
|
||||
lvlError = 0,
|
||||
lvlInfo,
|
||||
lvlTalkative,
|
||||
lvlChatty,
|
||||
lvlDebug,
|
||||
lvlVomit
|
||||
} Verbosity;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -121,15 +121,6 @@ Paths createDirs(const Path & path);
|
||||
void createSymlink(const Path & target, const Path & link);
|
||||
|
||||
|
||||
template<class T, class A>
|
||||
T singleton(const A & a)
|
||||
{
|
||||
T t;
|
||||
t.insert(a);
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
/* Messages. */
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user