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
This commit is contained in:
Vincent Ambo 2020-05-20 22:27:37 +01:00
parent d331d3a0b5
commit 689ef502f5
78 changed files with 863 additions and 792 deletions

View file

@ -57,7 +57,7 @@ static int _main(int argc, char** argv) {
{
HashType ht = htSHA256;
std::vector<string> 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);