From a51df5f00d47d516d5b6006a2c8c89dbbad06fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 3 Dec 2015 08:42:12 +0100 Subject: [PATCH] Removed unused CppCheck::analyseFile --- lib/cppcheck.cpp | 20 -------------------- lib/cppcheck.h | 5 ----- 2 files changed, 25 deletions(-) diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index fc529c1c9..d6f2e4f5c 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -286,26 +286,6 @@ void CppCheck::internalError(const std::string &filename, const std::string &msg } } -void CppCheck::analyseFile(std::istream &fin, const std::string &filename) -{ - // Preprocess file.. - Preprocessor preprocessor(_settings, this); - std::list configurations; - std::string filedata; - preprocessor.preprocess(fin, filedata, configurations, filename, _settings._includePaths); - const std::string code = preprocessor.getcode(filedata, "", filename); - - if (_settings.checkConfiguration) { - return; - } - - // Tokenize.. - Tokenizer tokenizer(&_settings, this); - std::istringstream istr(code); - tokenizer.tokenize(istr, filename.c_str()); - tokenizer.simplifyTokenList2(); -} - //--------------------------------------------------------------------------- // CppCheck - A function that checks a specified file //--------------------------------------------------------------------------- diff --git a/lib/cppcheck.h b/lib/cppcheck.h index 90210889c..375f856cb 100644 --- a/lib/cppcheck.h +++ b/lib/cppcheck.h @@ -117,11 +117,6 @@ public: */ void getErrorMessages(); - /** - * @brief Analyse file - It's public so unit tests can be written - */ - void analyseFile(std::istream &f, const std::string &filename); - void tooManyConfigsError(const std::string &file, const std::size_t numberOfConfigurations); void purgedConfigurationMessage(const std::string &file, const std::string& configuration);