From 3ec366167823c0821d94b4b79fb6265c58e8bffb Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 6 Aug 2020 03:26:30 +0100 Subject: [PATCH] refactor(tvix): Use absl::btree_map for DerivationInputs Change-Id: If160ab1b09161969d9080d5d0d6f82e44a953e3c Reviewed-on: https://cl.tvl.fyi/c/depot/+/1684 Reviewed-by: glittershark Tested-by: BuildkiteCI --- third_party/nix/src/libstore/build.cc | 2 +- third_party/nix/src/libstore/derivations.hh | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/third_party/nix/src/libstore/build.cc b/third_party/nix/src/libstore/build.cc index afd2374b0..27d6aa611 100644 --- a/third_party/nix/src/libstore/build.cc +++ b/third_party/nix/src/libstore/build.cc @@ -713,7 +713,7 @@ HookInstance::~HookInstance() { ////////////////////////////////////////////////////////////////////// -typedef std::map StringRewrites; +using StringRewrites = std::map; std::string rewriteStrings(std::string s, const StringRewrites& rewrites) { for (auto& i : rewrites) { diff --git a/third_party/nix/src/libstore/derivations.hh b/third_party/nix/src/libstore/derivations.hh index 63527149d..dfdebdd01 100644 --- a/third_party/nix/src/libstore/derivations.hh +++ b/third_party/nix/src/libstore/derivations.hh @@ -42,10 +42,8 @@ using DerivationOutputs = absl::btree_map; /* For inputs that are sub-derivations, we specify exactly which output IDs we are interested in. */ -// TODO(grfn): change to absl::flat_hash_map -using DerivationInputs = std::map; +using DerivationInputs = absl::btree_map; -// TODO(grfn): change to absl::flat_hash_map using StringPairs = std::map; struct BasicDerivation {