From ef54f5da9fa30b5c302f2a49595ee5d041f9706a Mon Sep 17 00:00:00 2001 From: Kane York Date: Fri, 24 Jul 2020 21:09:44 -0700 Subject: fix(3p/nix): apply all clang-tidy fixes Change-Id: I265e763393422ee1881653527c91024458060825 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1432 Tested-by: BuildkiteCI Reviewed-by: tazjin --- third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc') diff --git a/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc b/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc index dc0dce345bcd..0e5b2ec8a537 100644 --- a/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc +++ b/third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc @@ -33,7 +33,7 @@ std::string resolveMirrorUri(EvalState& state, std::string uri) { } std::string mirrorName(s, 0, p); - Value vMirrors; + Value vMirrors{}; state.eval( state.parseExprFromString( "import ", "."), @@ -120,7 +120,7 @@ static int _main(int argc, char** argv) { } else { Path path = resolveExprPath(lookupFileArg(*state, args.empty() ? "." : args[0])); - Value vRoot; + Value vRoot{}; state->evalFile(path, vRoot); Value& v(*findAlongAttrPath(*state, attrPath, autoArgs, vRoot)); state->forceAttrs(v); @@ -180,7 +180,7 @@ static int _main(int argc, char** argv) { auto actualUri = resolveMirrorUri(*state, uri); AutoDelete tmpDir(createTempDir(), true); - Path tmpFile = (Path)tmpDir + "/tmp"; + Path tmpFile = Path(tmpDir) + "/tmp"; /* Download the file. */ { @@ -200,7 +200,7 @@ static int _main(int argc, char** argv) { /* Optionally unpack the file. */ if (unpack) { LOG(INFO) << "unpacking..."; - Path unpacked = (Path)tmpDir + "/unpacked"; + Path unpacked = Path(tmpDir) + "/unpacked"; createDirs(unpacked); if (absl::EndsWith(baseNameOf(uri), ".zip")) { runProgram("unzip", true, {"-qq", tmpFile, "-d", unpacked}); -- cgit 1.4.1