about summary refs log tree commit diff
path: root/third_party/nix/src/libutil/config.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/libutil/config.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/libutil/config.cc')
-rw-r--r--third_party/nix/src/libutil/config.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/third_party/nix/src/libutil/config.cc b/third_party/nix/src/libutil/config.cc
index 56f0c8c3e7cd..ef47c167ed49 100644
--- a/third_party/nix/src/libutil/config.cc
+++ b/third_party/nix/src/libutil/config.cc
@@ -303,7 +303,7 @@ template class BaseSetting<Strings>;
 template class BaseSetting<StringSet>;
 
 void PathSetting::set(const std::string& str) {
-  if (str == "") {
+  if (str.empty()) {
     if (allowEmpty) {
       value = "";
     } else {
@@ -356,7 +356,7 @@ GlobalConfig globalConfig;
 GlobalConfig::ConfigRegistrations* GlobalConfig::configRegistrations;
 
 GlobalConfig::Register::Register(Config* config) {
-  if (!configRegistrations) {
+  if (configRegistrations == nullptr) {
     configRegistrations = new ConfigRegistrations;
   }
   configRegistrations->emplace_back(config);