Skip to content

Commit 9acda09

Browse files
committed
refactoring. combine 2 if to 1
1 parent b1d1869 commit 9acda09

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

lib/cppcheck.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,10 @@ unsigned int CppCheck::processFile(const std::string& filename, std::istream& fi
215215
continue;
216216

217217
// dump xml if --dump
218-
if (_settings.dump) {
219-
if (fdump.is_open()) {
220-
fdump << "<dump cfg=\"" << cfg << "\">" << std::endl;
221-
_tokenizer.dump(fdump);
222-
fdump << "</dump>" << std::endl;
223-
}
218+
if (_settings.dump && fdump.is_open()) {
219+
fdump << "<dump cfg=\"" << cfg << "\">" << std::endl;
220+
_tokenizer.dump(fdump);
221+
fdump << "</dump>" << std::endl;
224222
}
225223

226224
// Skip if we already met the same simplified token list

0 commit comments

Comments
 (0)