From 4930a1239c7e25cb75071792cc0f898e735fa8a4 Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Wed, 19 Apr 2023 14:39:40 +0200 Subject: [PATCH] apps: Replace static method with anonymous namespace --- src/apps/calibrate/main.cpp | 4 +++- src/apps/check-device/main.cpp | 4 +++- src/apps/daemon/main.cpp | 4 +++- src/apps/dump/main.cpp | 4 +++- src/apps/perf/main.cpp | 4 +++- src/apps/visualization/plot.cpp | 4 +++- src/apps/visualization/show.cpp | 4 +++- 7 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/apps/calibrate/main.cpp b/src/apps/calibrate/main.cpp index e19166f5..12dc1bb6 100644 --- a/src/apps/calibrate/main.cpp +++ b/src/apps/calibrate/main.cpp @@ -17,8 +17,9 @@ #include namespace iptsd::apps::calibrate { +namespace { -static int run(const gsl::span args) +int run(const gsl::span args) { CLI::App app {"Utility for measuring your finger size and calibrating iptsd."}; @@ -42,6 +43,7 @@ static int run(const gsl::span args) return 0; } +} // namespace } // namespace iptsd::apps::calibrate int main(int argc, char **argv) diff --git a/src/apps/check-device/main.cpp b/src/apps/check-device/main.cpp index d19e2593..fb2fec7f 100644 --- a/src/apps/check-device/main.cpp +++ b/src/apps/check-device/main.cpp @@ -18,8 +18,9 @@ #include namespace iptsd::apps::check { +namespace { -static int run(const gsl::span args) +int run(const gsl::span args) { CLI::App app {"Utility for checking if a hidraw device is an IPTS touchscreen."}; @@ -71,6 +72,7 @@ static int run(const gsl::span args) return 0; } +} // namespace } // namespace iptsd::apps::check int main(int argc, char **argv) diff --git a/src/apps/daemon/main.cpp b/src/apps/daemon/main.cpp index 189794cf..3bad2bb2 100644 --- a/src/apps/daemon/main.cpp +++ b/src/apps/daemon/main.cpp @@ -17,8 +17,9 @@ #include namespace iptsd::apps::daemon { +namespace { -static int run(const gsl::span args) +int run(const gsl::span args) { CLI::App app {"Daemon to translate touchscreen inputs to Linux input events."}; @@ -42,6 +43,7 @@ static int run(const gsl::span args) return 0; } +} // namespace } // namespace iptsd::apps::daemon int main(int argc, char **argv) diff --git a/src/apps/dump/main.cpp b/src/apps/dump/main.cpp index d7dd9235..f355aedb 100644 --- a/src/apps/dump/main.cpp +++ b/src/apps/dump/main.cpp @@ -17,8 +17,9 @@ #include namespace iptsd::apps::dump { +namespace { -static int run(const gsl::span args) +int run(const gsl::span args) { CLI::App app {"Utility for saving raw reports from your touchscreen to a binary file."}; @@ -48,6 +49,7 @@ static int run(const gsl::span args) return 0; } +} // namespace } // namespace iptsd::apps::dump int main(int argc, char **argv) diff --git a/src/apps/perf/main.cpp b/src/apps/perf/main.cpp index ed5a13b5..bee95830 100644 --- a/src/apps/perf/main.cpp +++ b/src/apps/perf/main.cpp @@ -20,8 +20,9 @@ #include namespace iptsd::apps::perf { +namespace { -static int run(const gsl::span args) +int run(const gsl::span args) { CLI::App app {"Utility for performance testing of iptsd."}; @@ -91,6 +92,7 @@ static int run(const gsl::span args) return 0; } +} // namespace } // namespace iptsd::apps::perf int main(int argc, char **argv) diff --git a/src/apps/visualization/plot.cpp b/src/apps/visualization/plot.cpp index fc353b9f..f585abcf 100644 --- a/src/apps/visualization/plot.cpp +++ b/src/apps/visualization/plot.cpp @@ -18,8 +18,9 @@ #include namespace iptsd::apps::visualization::plot { +namespace { -static int run(const gsl::span args) +int run(const gsl::span args) { CLI::App app {"Utility for rendering captured touchscreen inputs to PNG frames."}; @@ -49,6 +50,7 @@ static int run(const gsl::span args) return 0; } +} // namespace } // namespace iptsd::apps::visualization::plot int main(int argc, char **argv) diff --git a/src/apps/visualization/show.cpp b/src/apps/visualization/show.cpp index bd3e8dce..1039e0c5 100644 --- a/src/apps/visualization/show.cpp +++ b/src/apps/visualization/show.cpp @@ -18,8 +18,9 @@ #include namespace iptsd::apps::visualization::show { +namespace { -static int run(const gsl::span args) +int run(const gsl::span args) { CLI::App app {"Utility for rendering touchscreen inputs in real time."}; @@ -43,6 +44,7 @@ static int run(const gsl::span args) return 0; } +} // namespace } // namespace iptsd::apps::visualization::show int main(int argc, char **argv)