mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 04:41:16 +00:00
[clang-tidy] use empty method (#895)
Found with readability-container-size-empty Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -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) {
|
|||||||
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);
|
||||||
|
Reference in New Issue
Block a user