Skip to content

Commit 4930a12

Browse files
committed
apps: Replace static method with anonymous namespace
1 parent c7e7dd0 commit 4930a12

File tree

7 files changed

+21
-7
lines changed

7 files changed

+21
-7
lines changed

src/apps/calibrate/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
#include <string>
1818

1919
namespace iptsd::apps::calibrate {
20+
namespace {
2021

21-
static int run(const gsl::span<char *> args)
22+
int run(const gsl::span<char *> args)
2223
{
2324
CLI::App app {"Utility for measuring your finger size and calibrating iptsd."};
2425

@@ -42,6 +43,7 @@ static int run(const gsl::span<char *> args)
4243
return 0;
4344
}
4445

46+
} // namespace
4547
} // namespace iptsd::apps::calibrate
4648

4749
int main(int argc, char **argv)

src/apps/check-device/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
#include <string>
1919

2020
namespace iptsd::apps::check {
21+
namespace {
2122

22-
static int run(const gsl::span<char *> args)
23+
int run(const gsl::span<char *> args)
2324
{
2425
CLI::App app {"Utility for checking if a hidraw device is an IPTS touchscreen."};
2526

@@ -71,6 +72,7 @@ static int run(const gsl::span<char *> args)
7172
return 0;
7273
}
7374

75+
} // namespace
7476
} // namespace iptsd::apps::check
7577

7678
int main(int argc, char **argv)

src/apps/daemon/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
#include <string>
1818

1919
namespace iptsd::apps::daemon {
20+
namespace {
2021

21-
static int run(const gsl::span<char *> args)
22+
int run(const gsl::span<char *> args)
2223
{
2324
CLI::App app {"Daemon to translate touchscreen inputs to Linux input events."};
2425

@@ -42,6 +43,7 @@ static int run(const gsl::span<char *> args)
4243
return 0;
4344
}
4445

46+
} // namespace
4547
} // namespace iptsd::apps::daemon
4648

4749
int main(int argc, char **argv)

src/apps/dump/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
#include <string>
1818

1919
namespace iptsd::apps::dump {
20+
namespace {
2021

21-
static int run(const gsl::span<char *> args)
22+
int run(const gsl::span<char *> args)
2223
{
2324
CLI::App app {"Utility for saving raw reports from your touchscreen to a binary file."};
2425

@@ -48,6 +49,7 @@ static int run(const gsl::span<char *> args)
4849
return 0;
4950
}
5051

52+
} // namespace
5153
} // namespace iptsd::apps::dump
5254

5355
int main(int argc, char **argv)

src/apps/perf/main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
#include <string>
2121

2222
namespace iptsd::apps::perf {
23+
namespace {
2324

24-
static int run(const gsl::span<char *> args)
25+
int run(const gsl::span<char *> args)
2526
{
2627
CLI::App app {"Utility for performance testing of iptsd."};
2728

@@ -91,6 +92,7 @@ static int run(const gsl::span<char *> args)
9192
return 0;
9293
}
9394

95+
} // namespace
9496
} // namespace iptsd::apps::perf
9597

9698
int main(int argc, char **argv)

src/apps/visualization/plot.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
#include <string>
1919

2020
namespace iptsd::apps::visualization::plot {
21+
namespace {
2122

22-
static int run(const gsl::span<char *> args)
23+
int run(const gsl::span<char *> args)
2324
{
2425
CLI::App app {"Utility for rendering captured touchscreen inputs to PNG frames."};
2526

@@ -49,6 +50,7 @@ static int run(const gsl::span<char *> args)
4950
return 0;
5051
}
5152

53+
} // namespace
5254
} // namespace iptsd::apps::visualization::plot
5355

5456
int main(int argc, char **argv)

src/apps/visualization/show.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
#include <string>
1919

2020
namespace iptsd::apps::visualization::show {
21+
namespace {
2122

22-
static int run(const gsl::span<char *> args)
23+
int run(const gsl::span<char *> args)
2324
{
2425
CLI::App app {"Utility for rendering touchscreen inputs in real time."};
2526

@@ -43,6 +44,7 @@ static int run(const gsl::span<char *> args)
4344
return 0;
4445
}
4546

47+
} // namespace
4648
} // namespace iptsd::apps::visualization::show
4749

4850
int main(int argc, char **argv)

0 commit comments

Comments
 (0)