about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/store-api.hh
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-08-20T02·05+0100
committertazjin <mail@tazj.in>2020-08-20T11·48+0000
commitf7fa77f14dedad98ab9e8a014d3bcfd60565dfd0 (patch)
tree915e92a5b772d2e1d29995897f6afe2ddbbfbdb1 /third_party/nix/src/libstore/store-api.hh
parenta75c0278db652c7265f205f1a529632e6b050157 (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 '')
-rw-r--r--third_party/nix/src/libstore/store-api.hh17
1 files changed, 8 insertions, 9 deletions
diff --git a/third_party/nix/src/libstore/store-api.hh b/third_party/nix/src/libstore/store-api.hh
index bb2f1a950b..6c125ad276 100644
--- a/third_party/nix/src/libstore/store-api.hh
+++ b/third_party/nix/src/libstore/store-api.hh
@@ -50,7 +50,7 @@ const size_t storePathHashLen = 32;  // i.e. 160 bits
 /* Magic header of exportPath() output (obsolete). */
 const uint32_t exportMagic = 0x4558494e;
 
-typedef std::unordered_map<Path, std::unordered_set<std::string>> Roots;
+using Roots = std::unordered_map<Path, std::unordered_set<std::string>>;
 
 struct GCOptions {
   /* Garbage collector operation:
@@ -66,12 +66,12 @@ struct GCOptions {
      - `gcDeleteSpecific': delete the paths listed in
         `pathsToDelete', insofar as they are not reachable.
   */
-  typedef enum {
+  using GCAction = enum {
     gcReturnLive,
     gcReturnDead,
     gcDeleteDead,
     gcDeleteSpecific,
-  } GCAction;
+  };
 
   GCAction action{gcDeleteDead};
 
@@ -110,7 +110,7 @@ struct SubstitutablePathInfo {
   unsigned long long narSize;      /* 0 = unknown */
 };
 
-typedef std::map<Path, SubstitutablePathInfo> SubstitutablePathInfos;
+using SubstitutablePathInfos = std::map<Path, SubstitutablePathInfo>;
 
 struct ValidPathInfo {
   Path path;
@@ -248,7 +248,7 @@ struct BuildResult {
 
 class Store : public std::enable_shared_from_this<Store>, public Config {
  public:
-  typedef std::map<std::string, std::string> Params;
+  using Params = std::map<std::string, std::string>;
 
   const PathSetting storeDir_{this, false, settings.nixStore, "store",
                               "path to the Nix store"};
@@ -780,12 +780,11 @@ StoreType getStoreType(const std::string& uri = settings.storeUri.get(),
 std::list<ref<Store>> getDefaultSubstituters();
 
 /* Store implementation registration. */
-typedef std::function<std::shared_ptr<Store>(const std::string& uri,
-                                             const Store::Params& params)>
-    OpenStore;
+using OpenStore = std::function<std::shared_ptr<Store>(const std::string&,
+                                                       const Store::Params&)>;
 
 struct RegisterStoreImplementation {
-  typedef std::vector<OpenStore> Implementations;
+  using Implementations = std::vector<OpenStore>;
   static Implementations* implementations;
 
   RegisterStoreImplementation(OpenStore fun) {