From 9acda09fa2bd1e3b9ec90e2b4ae4948dcc1d665a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 14 Dec 2015 20:05:17 +0100 Subject: [PATCH] refactoring. combine 2 if to 1 --- lib/cppcheck.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index a4de5a298..06b05339a 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -215,12 +215,10 @@ unsigned int CppCheck::processFile(const std::string& filename, std::istream& fi continue; // dump xml if --dump - if (_settings.dump) { - if (fdump.is_open()) { - fdump << "" << std::endl; - _tokenizer.dump(fdump); - fdump << "" << std::endl; - } + if (_settings.dump && fdump.is_open()) { + fdump << "" << std::endl; + _tokenizer.dump(fdump); + fdump << "" << std::endl; } // Skip if we already met the same simplified token list