diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-19T21·02+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-19T21·02+0100 |
commit | 88f337588c9f1a41ac67b3afb8d43f124b4d153b (patch) | |
tree | 1e7ee739c979f5a54a1c23fcb1a6adf49652a7e5 /third_party/nix/src/nix/installables.cc | |
parent | 39087321811e81e26a1a47d6967df1088dcf0e95 (diff) |
refactor(3p/nix): Make all single-argument constructors explicit r/778
Implicit constructors can be confusing, especially in a codebase that is already as unintentionally obfuscated as this one. https://google.github.io/styleguide/cppguide.html#Explicit_Constructors
Diffstat (limited to 'third_party/nix/src/nix/installables.cc')
-rw-r--r-- | third_party/nix/src/nix/installables.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/third_party/nix/src/nix/installables.cc b/third_party/nix/src/nix/installables.cc index 8a7de8655bef..2d896e3bb9bb 100644 --- a/third_party/nix/src/nix/installables.cc +++ b/third_party/nix/src/nix/installables.cc @@ -100,7 +100,7 @@ Buildable Installable::toBuildable() { struct InstallableStorePath : Installable { Path storePath; - InstallableStorePath(const Path& storePath) : storePath(storePath) {} + explicit InstallableStorePath(const Path& storePath) : storePath(storePath) {} std::string what() override { return storePath; } @@ -112,7 +112,7 @@ struct InstallableStorePath : Installable { struct InstallableValue : Installable { SourceExprCommand& cmd; - InstallableValue(SourceExprCommand& cmd) : cmd(cmd) {} + explicit InstallableValue(SourceExprCommand& cmd) : cmd(cmd) {} Buildables toBuildables() override { auto state = cmd.getEvalState(); |