"...git@developer.sourcefind.cn:OpenDAS/mmdetection3d.git" did not exist on "2d91ef832d26b1f26f2f7ee2a8dff3cbba4ee65a"
Unverified Commit dbb385bd authored by Rosen Penev's avatar Rosen Penev Committed by GitHub
Browse files

[clang-tidy] use empty method (#895)



Found with readability-container-size-empty
Signed-off-by: default avatarRosen Penev <rosenp@gmail.com>
parent b2cd0087
...@@ -68,14 +68,14 @@ int main(int argc, char** argv) { ...@@ -68,14 +68,14 @@ int main(int argc, char** argv) {
} }
} }
if (N > 1 && !cache && filename == "") { if (N > 1 && !cache && filename.empty()) {
usage(); usage();
return -1; return -1;
} }
if (cache) { if (cache) {
std::string input; std::string input;
if (filename != "") { if (!filename.empty()) {
std::ifstream in(filename); std::ifstream in(filename);
input = read_stream(in); input = read_stream(in);
} else { } else {
...@@ -87,7 +87,7 @@ int main(int argc, char** argv) { ...@@ -87,7 +87,7 @@ int main(int argc, char** argv) {
run(in); run(in);
} }
} else { } else {
if (filename != "") { if (!filename.empty()) {
std::ifstream in(filename); std::ifstream in(filename);
for (int i = 0; i < N; i++) { for (int i = 0; i < N; i++) {
in.seekg(std::ios_base::beg); in.seekg(std::ios_base::beg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment