Skip to content

Commit 1ef1143

Browse files
committed
Make local functions static
1 parent d1927e3 commit 1ef1143

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

gui/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
#include "translationhandler.h"
3636

3737

38-
void ShowUsage();
39-
void ShowVersion();
40-
bool CheckArgs(const QStringList &args);
38+
static void ShowUsage();
39+
static void ShowVersion();
40+
static bool CheckArgs(const QStringList &args);
4141

4242
int main(int argc, char *argv[])
4343
{
@@ -82,7 +82,7 @@ int main(int argc, char *argv[])
8282

8383
// Check only arguments needing action before GUI is shown.
8484
// Rest of the arguments are handled in MainWindow::HandleCLIParams()
85-
bool CheckArgs(const QStringList &args)
85+
static bool CheckArgs(const QStringList &args)
8686
{
8787
if (args.contains("-h") || args.contains("--help")) {
8888
ShowUsage();
@@ -95,7 +95,7 @@ bool CheckArgs(const QStringList &args)
9595
return true;
9696
}
9797

98-
void ShowUsage()
98+
static void ShowUsage()
9999
{
100100
QString helpMessage = MainWindow::tr(
101101
"Cppcheck GUI.\n\n"
@@ -120,7 +120,7 @@ void ShowUsage()
120120
#endif
121121
}
122122

123-
void ShowVersion()
123+
static void ShowVersion()
124124
{
125125
#if defined(_WIN32)
126126
AboutDialog *dlg = new AboutDialog(CppCheck::version(), CppCheck::extraVersion(), 0);

lib/checkio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ static bool findFormat(unsigned int arg, const Token *firstArg,
490490
}
491491

492492
// Utility function returning whether iToTest equals iTypename or iOptionalPrefix+iTypename
493-
inline bool typesMatch(const std::string& iToTest, const std::string& iTypename, const std::string& iOptionalPrefix = "std::")
493+
static inline bool typesMatch(const std::string& iToTest, const std::string& iTypename, const std::string& iOptionalPrefix = "std::")
494494
{
495495
return (iToTest == iTypename) || (iToTest == iOptionalPrefix + iTypename);
496496
}

0 commit comments

Comments
 (0)