diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index 84d38b494..e01a3a29c 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -76,15 +76,6 @@ unsigned int CppCheck::check(const std::string &path, const std::string &content return processFile(path, iss); } -void CppCheck::replaceAll(std::string& code, const std::string &from, const std::string &to) -{ - std::size_t pos = 0; - while ((pos = code.find(from, pos)) != std::string::npos) { - code.replace(pos, from.length(), to); - pos += to.length(); - } -} - unsigned int CppCheck::processFile(const std::string& filename, std::istream& fileStream) { exitcode = 0; diff --git a/lib/cppcheck.h b/lib/cppcheck.h index 6cebeac7f..5c6cf7404 100644 --- a/lib/cppcheck.h +++ b/lib/cppcheck.h @@ -177,12 +177,6 @@ private: */ virtual void reportOut(const std::string &outmsg); - /** - * @brief Replace "from" strings with "to" strings in "code" - * and return it. - */ - static void replaceAll(std::string& code, const std::string &from, const std::string &to); - std::list _errorList; Settings _settings;