about summary refs log tree commit diff
path: root/third_party/nix/src/nix/doctor.cc
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-20T21·27+0100
committerVincent Ambo <tazjin@google.com>2020-05-20T21·27+0100
commit689ef502f5b0655c9923ed77da2ae3504630f473 (patch)
tree3e331c153646f136875f047cc3b9f0aad8c86341 /third_party/nix/src/nix/doctor.cc
parentd331d3a0b5c497a46e2636f308234be66566c04c (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/doctor.cc')
-rw-r--r--third_party/nix/src/nix/doctor.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/third_party/nix/src/nix/doctor.cc b/third_party/nix/src/nix/doctor.cc
index 44ce2d92921d..95bf8a922e26 100644
--- a/third_party/nix/src/nix/doctor.cc
+++ b/third_party/nix/src/nix/doctor.cc
@@ -7,7 +7,7 @@
 using namespace nix;
 
 std::string formatProtocol(unsigned int proto) {
-  if (proto) {
+  if (proto != 0u) {
     auto major = GET_PROTOCOL_MAJOR(proto) >> 8;
     auto minor = GET_PROTOCOL_MINOR(proto);
     return (format("%1%.%2%") % major % minor).str();
@@ -41,7 +41,7 @@ struct CmdDoctor : StoreCommand {
     }
   }
 
-  bool checkNixInPath() {
+  static bool checkNixInPath() {
     PathSet dirs;
 
     for (auto& dir : tokenizeString<Strings>(getEnv("PATH"), ":")) {
@@ -64,7 +64,7 @@ struct CmdDoctor : StoreCommand {
     return true;
   }
 
-  bool checkProfileRoots(ref<Store> store) {
+  static bool checkProfileRoots(ref<Store> store) {
     PathSet dirs;
 
     for (auto& dir : tokenizeString<Strings>(getEnv("PATH"), ":")) {
@@ -106,7 +106,7 @@ struct CmdDoctor : StoreCommand {
     return true;
   }
 
-  bool checkStoreProtocol(unsigned int storeProto) {
+  static bool checkStoreProtocol(unsigned int storeProto) {
     unsigned int clientProto = GET_PROTOCOL_MAJOR(SERVE_PROTOCOL_VERSION) ==
                                        GET_PROTOCOL_MAJOR(storeProto)
                                    ? SERVE_PROTOCOL_VERSION