Visitar URL original
Removed unused CppCheck::replaceAll() · gitltl/cppcheck@61da950 · GitHub
Skip to content

Commit 61da950

Browse files
committed
Removed unused CppCheck::replaceAll()
1 parent 1f16e72 commit 61da950

2 files changed

Lines changed: 0 additions & 15 deletions

File tree

‎lib/cppcheck.cpp‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,6 @@ unsigned int CppCheck::check(const std::string &path, const std::string &content
7676
return processFile(path, iss);
7777
}
7878

79-
void CppCheck::replaceAll(std::string& code, const std::string &from, const std::string &to)
80-
{
81-
std::size_t pos = 0;
82-
while ((pos = code.find(from, pos)) != std::string::npos) {
83-
code.replace(pos, from.length(), to);
84-
pos += to.length();
85-
}
86-
}
87-
8879
unsigned int CppCheck::processFile(const std::string& filename, std::istream& fileStream)
8980
{
9081
exitcode = 0;

‎lib/cppcheck.h‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,6 @@ class CPPCHECKLIB CppCheck : ErrorLogger {
177177
*/
178178
virtual void reportOut(const std::string &outmsg);
179179

180-
/**
181-
* @brief Replace "from" strings with "to" strings in "code"
182-
* and return it.
183-
*/
184-
static void replaceAll(std::string& code, const std::string &from, const std::string &to);
185-
186180
std::list<std::string> _errorList;
187181
Settings _settings;
188182

0 commit comments

Comments
 (0)