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