Fix ticket #252 (Fix --style warnings in cppcheck)

http://apps.sourceforge.net/trac/cppcheck/ticket/252
This commit is contained in:
Reijo Tomperi 2009-04-13 12:02:21 +03:00
parent 8533e112fe
commit 9c9e920829
3 changed files with 7 additions and 3 deletions

View File

@ -34,6 +34,7 @@
<Unit filename="gui/checkdialog.h" />
<Unit filename="gui/checkthread.cpp" />
<Unit filename="gui/checkthread.h" />
<Unit filename="gui/common.h" />
<Unit filename="gui/main.cpp" />
<Unit filename="gui/mainwindow.cpp" />
<Unit filename="gui/mainwindow.h" />
@ -43,6 +44,10 @@
<Unit filename="gui/resultsview.h" />
<Unit filename="gui/settingsdialog.cpp" />
<Unit filename="gui/settingsdialog.h" />
<Unit filename="gui/threadhandler.cpp" />
<Unit filename="gui/threadhandler.h" />
<Unit filename="gui/threadresult.cpp" />
<Unit filename="gui/threadresult.h" />
<Unit filename="src/check.h" />
<Unit filename="src/checkautovariables.cpp" />
<Unit filename="src/checkautovariables.h" />

View File

@ -41,7 +41,6 @@ void ThreadHandler::SetFiles(const QStringList &files)
{
mResults.SetFiles(files);
mLastFiles = files;
QString file;
}
void ThreadHandler::Check(Settings settings, bool recheck)

View File

@ -69,7 +69,7 @@ protected:
ErrorLogger * const _errorLogger;
/** report an error */
void reportError(const Token *tok, const std::string severity, const std::string id, const std::string msg)
void reportError(const Token *tok, const std::string &severity, const std::string &id, const std::string &msg)
{
std::list<const Token *> callstack;
callstack.push_back(tok);
@ -77,7 +77,7 @@ protected:
}
/** report an error */
void reportError(const std::list<const Token *> callstack, const std::string severity, const std::string id, const std::string msg)
void reportError(const std::list<const Token *> &callstack, const std::string &severity, const std::string &id, const std::string &msg)
{
std::list<ErrorLogger::ErrorMessage::FileLocation> locationList;
for (std::list<const Token *>::const_iterator it = callstack.begin(); it != callstack.end(); ++it)