diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-10-06 13:36:55 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-10-06 13:49:20 +0200 |
commit | 85c8be6286e8f5464813a8a29b0b78d892498745 (patch) | |
tree | e270b31fa13afd6e87e610f41fcffe039d4381bd /src/nix/hash.cc | |
parent | 0419cd26954d9d7c5b5ace96501b41cc81d66eed (diff) |
Remove static variable name clashes
This was useful for an experiment with building Nix as a single
compilation unit. It's not very useful otherwise but also doesn't
hurt...
Diffstat (limited to 'src/nix/hash.cc')
-rw-r--r-- | src/nix/hash.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nix/hash.cc b/src/nix/hash.cc index 494f00a20..1d23bb0e2 100644 --- a/src/nix/hash.cc +++ b/src/nix/hash.cc @@ -79,8 +79,8 @@ struct CmdHash : Command } }; -static RegisterCommand r1("hash-file", [](){ return make_ref<CmdHash>(FileIngestionMethod::Flat); }); -static RegisterCommand r2("hash-path", [](){ return make_ref<CmdHash>(FileIngestionMethod::Recursive); }); +static RegisterCommand rCmdHashFile("hash-file", [](){ return make_ref<CmdHash>(FileIngestionMethod::Flat); }); +static RegisterCommand rCmdHashPath("hash-path", [](){ return make_ref<CmdHash>(FileIngestionMethod::Recursive); }); struct CmdToBase : Command { @@ -112,10 +112,10 @@ struct CmdToBase : Command } }; -static RegisterCommand r3("to-base16", [](){ return make_ref<CmdToBase>(Base16); }); -static RegisterCommand r4("to-base32", [](){ return make_ref<CmdToBase>(Base32); }); -static RegisterCommand r5("to-base64", [](){ return make_ref<CmdToBase>(Base64); }); -static RegisterCommand r6("to-sri", [](){ return make_ref<CmdToBase>(SRI); }); +static RegisterCommand rCmdToBase16("to-base16", [](){ return make_ref<CmdToBase>(Base16); }); +static RegisterCommand rCmdToBase32("to-base32", [](){ return make_ref<CmdToBase>(Base32); }); +static RegisterCommand rCmdToBase64("to-base64", [](){ return make_ref<CmdToBase>(Base64); }); +static RegisterCommand rCmdToSRI("to-sri", [](){ return make_ref<CmdToBase>(SRI); }); /* Legacy nix-hash command. */ static int compatNixHash(int argc, char * * argv) @@ -167,4 +167,4 @@ static int compatNixHash(int argc, char * * argv) return 0; } -static RegisterLegacyCommand s1("nix-hash", compatNixHash); +static RegisterLegacyCommand r_nix_hash("nix-hash", compatNixHash); |