diff options
author | Vincent Ambo <mail@tazj.in> | 2020-08-20T02·05+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2020-08-20T11·48+0000 |
commit | f7fa77f14dedad98ab9e8a014d3bcfd60565dfd0 (patch) | |
tree | 915e92a5b772d2e1d29995897f6afe2ddbbfbdb1 /third_party/nix/src/libstore/build.cc | |
parent | a75c0278db652c7265f205f1a529632e6b050157 (diff) |
style(tvix): typedef -> using in build.cc/store-api.hh r/1688
this shuts up a few lints ... Change-Id: I51ee9418767e97247f98b170cdad137e5b12b44d Reviewed-on: https://cl.tvl.fyi/c/depot/+/1796 Tested-by: BuildkiteCI Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'third_party/nix/src/libstore/build.cc')
-rw-r--r-- | third_party/nix/src/libstore/build.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/third_party/nix/src/libstore/build.cc b/third_party/nix/src/libstore/build.cc index a9d40991d30d..91f80e51e042 100644 --- a/third_party/nix/src/libstore/build.cc +++ b/third_party/nix/src/libstore/build.cc @@ -96,21 +96,21 @@ struct CompareGoalPtrs { }; /* Set of goals. */ -typedef std::set<GoalPtr, CompareGoalPtrs> Goals; +using Goals = std::set<GoalPtr, CompareGoalPtrs>; using WeakGoals = std::list<WeakGoalPtr>; /* A map of paths to goals (and the other way around). */ -typedef std::map<Path, WeakGoalPtr> WeakGoalMap; +using WeakGoalMap = std::map<Path, WeakGoalPtr>; class Goal : public std::enable_shared_from_this<Goal> { public: - typedef enum { + using ExitCode = enum { ecBusy, ecSuccess, ecFailed, ecNoSubstituters, ecIncompleteClosure - } ExitCode; + }; protected: /* Backlink to the worker. */ @@ -728,7 +728,7 @@ std::string rewriteStrings(std::string s, const StringRewrites& rewrites) { ////////////////////////////////////////////////////////////////////// -typedef enum { rpAccept, rpDecline, rpPostpone } HookReply; +using HookReply = enum { rpAccept, rpDecline, rpPostpone }; class SubstitutionGoal; @@ -835,16 +835,16 @@ class DerivationGoal : public Goal { explicit ChrootPath(Path source = "", bool optional = false) : source(std::move(source)), optional(optional) {} }; - typedef std::map<Path, ChrootPath> - DirsInChroot; // maps target path to source path + using DirsInChroot = + std::map<Path, ChrootPath>; // maps target path to source path DirsInChroot dirsInChroot; - typedef std::map<std::string, std::string> Environment; + using Environment = std::map<std::string, std::string>; Environment env; /* Hash rewriting. */ StringRewrites inputRewrites, outputRewrites; - typedef std::map<Path, Path> RedirectedOutputs; + using RedirectedOutputs = std::map<Path, Path>; RedirectedOutputs redirectedOutputs; BuildMode buildMode; |