Make local functions static

This commit is contained in:
Thomas Jarosch 2015-01-05 01:20:33 +01:00
parent d1927e3492
commit 1ef1143609
2 changed files with 7 additions and 7 deletions

View File

@ -35,9 +35,9 @@
#include "translationhandler.h"
void ShowUsage();
void ShowVersion();
bool CheckArgs(const QStringList &args);
static void ShowUsage();
static void ShowVersion();
static bool CheckArgs(const QStringList &args);
int main(int argc, char *argv[])
{
@ -82,7 +82,7 @@ int main(int argc, char *argv[])
// Check only arguments needing action before GUI is shown.
// Rest of the arguments are handled in MainWindow::HandleCLIParams()
bool CheckArgs(const QStringList &args)
static bool CheckArgs(const QStringList &args)
{
if (args.contains("-h") || args.contains("--help")) {
ShowUsage();
@ -95,7 +95,7 @@ bool CheckArgs(const QStringList &args)
return true;
}
void ShowUsage()
static void ShowUsage()
{
QString helpMessage = MainWindow::tr(
"Cppcheck GUI.\n\n"
@ -120,7 +120,7 @@ void ShowUsage()
#endif
}
void ShowVersion()
static void ShowVersion()
{
#if defined(_WIN32)
AboutDialog *dlg = new AboutDialog(CppCheck::version(), CppCheck::extraVersion(), 0);

View File

@ -490,7 +490,7 @@ static bool findFormat(unsigned int arg, const Token *firstArg,
}
// Utility function returning whether iToTest equals iTypename or iOptionalPrefix+iTypename
inline bool typesMatch(const std::string& iToTest, const std::string& iTypename, const std::string& iOptionalPrefix = "std::")
static inline bool typesMatch(const std::string& iToTest, const std::string& iTypename, const std::string& iOptionalPrefix = "std::")
{
return (iToTest == iTypename) || (iToTest == iOptionalPrefix + iTypename);
}