From 689ef502f5b0655c9923ed77da2ae3504630f473 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 20 May 2020 22:27:37 +0100 Subject: refactor(3p/nix): Apply clang-tidy's readability-* fixes This applies the readability fixes listed here: https://clang.llvm.org/extra/clang-tidy/checks/list.html --- third_party/nix/src/nix-prefetch-url/nix-prefetch-url.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'third_party/nix/src/nix-prefetch-url') 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 8c92af19d5f3..5a9b81103d79 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 @@ -57,7 +57,7 @@ static int _main(int argc, char** argv) { { HashType ht = htSHA256; std::vector args; - bool printPath = getEnv("PRINT_PATH") != ""; + bool printPath = !getEnv("PRINT_PATH").empty(); bool fromExpr = false; string attrPath; bool unpack = false; @@ -163,7 +163,8 @@ static int _main(int argc, char** argv) { /* If an expected hash is given, the file may already exist in the store. */ - Hash hash, expectedHash(ht); + Hash hash; + Hash expectedHash(ht); Path storePath; if (args.size() == 2) { expectedHash = Hash(args[1], ht); -- cgit 1.4.1