diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-20T21·27+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-20T21·27+0100 |
commit | 689ef502f5b0655c9923ed77da2ae3504630f473 (patch) | |
tree | 3e331c153646f136875f047cc3b9f0aad8c86341 /third_party/nix/src/nix-instantiate | |
parent | d331d3a0b5c497a46e2636f308234be66566c04c (diff) |
refactor(3p/nix): Apply clang-tidy's readability-* fixes r/788
This applies the readability fixes listed here: https://clang.llvm.org/extra/clang-tidy/checks/list.html
Diffstat (limited to 'third_party/nix/src/nix-instantiate')
-rw-r--r-- | third_party/nix/src/nix-instantiate/nix-instantiate.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/third_party/nix/src/nix-instantiate/nix-instantiate.cc b/third_party/nix/src/nix-instantiate/nix-instantiate.cc index 05f481906b28..95e5341ade4a 100644 --- a/third_party/nix/src/nix-instantiate/nix-instantiate.cc +++ b/third_party/nix/src/nix-instantiate/nix-instantiate.cc @@ -63,13 +63,13 @@ void processExpr(EvalState& state, const Strings& attrPaths, bool parseOnly, /* What output do we want? */ string outputName = i.queryOutputName(); - if (outputName == "") { + if (outputName.empty()) { throw Error( format("derivation '%1%' lacks an 'outputName' attribute ") % drvPath); } - if (gcRoot == "") { + if (gcRoot.empty()) { printGCWarning(); } else { Path rootName = indirectRoot ? absPath(gcRoot) : gcRoot; @@ -173,7 +173,7 @@ static int _main(int argc, char** argv) { if (findFile) { for (auto& i : files) { Path p = state->findFile(i); - if (p == "") { + if (p.empty()) { throw Error(format("unable to find '%1%'") % i); } std::cout << p << std::endl; |