Make local functions static
This commit is contained in:
parent
d1927e3492
commit
1ef1143609
12
gui/main.cpp
12
gui/main.cpp
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue