mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-08 12:21:17 +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();
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (cache) {
|
||||
std::string input;
|
||||
if (filename != "") {
|
||||
if (!filename.empty()) {
|
||||
std::ifstream in(filename);
|
||||
input = read_stream(in);
|
||||
} else {
|
||||
@@ -87,7 +87,7 @@ int main(int argc, char** argv) {
|
||||
run(in);
|
||||
}
|
||||
} else {
|
||||
if (filename != "") {
|
||||
if (!filename.empty()) {
|
||||
std::ifstream in(filename);
|
||||
for (int i = 0; i < N; i++) {
|
||||
in.seekg(std::ios_base::beg);
|
||||
|
Reference in New Issue
Block a user