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:
parent
d331d3a0b5
commit
689ef502f5
78 changed files with 863 additions and 792 deletions
4
third_party/nix/src/libutil/config.cc
vendored
4
third_party/nix/src/libutil/config.cc
vendored
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue