clang-tidy readability

This commit is contained in:
Daniel Agar
2017-01-29 21:52:53 -05:00
parent b33d49c77d
commit 070cd55636
2 changed files with 4 additions and 4 deletions

View File

@@ -137,7 +137,7 @@ int uORB::Manager::orb_exists(const struct orb_metadata *meta, int instance)
#else
ret = px4_access(path, F_OK);
if (ret == -1 && meta != nullptr && _remote_topics.size() > 0) {
if (ret == -1 && meta != nullptr && !_remote_topics.empty()) {
ret = (_remote_topics.find(meta->o_name) != _remote_topics.end()) ? OK : ERROR;
}

View File

@@ -226,7 +226,7 @@ static void run_cmd(const vector<string> &appargs, bool exit_on_fail, bool silen
}
}
} else if (command.compare("help") == 0) {
} else if (command == "help") {
list_builtins(apps);
} else if (command.length() == 0 || command[0] == '#') {
@@ -387,7 +387,7 @@ int main(int argc, char **argv)
cout << "commands file: " << commands_file << endl;
if (commands_file.size() < 1) {
if (commands_file.empty()) {
PX4_ERR("Error commands file not specified");
return -1;
}
@@ -452,7 +452,7 @@ int main(int argc, char **argv)
px4::init(argc, argv, "px4");
// if commandfile is present, process the commands from the file
if (commands_file.size() != 0) {
if (!commands_file.empty()) {
ifstream infile(commands_file.c_str());
if (infile.is_open()) {