Skip to content

Commit

Permalink
apps: Replace static method with anonymous namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
StollD committed Apr 19, 2023
1 parent c7e7dd0 commit 4930a12
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/apps/calibrate/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
#include <string>

namespace iptsd::apps::calibrate {
namespace {

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

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

} // namespace
} // namespace iptsd::apps::calibrate

int main(int argc, char **argv)
Expand Down
4 changes: 3 additions & 1 deletion src/apps/check-device/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
#include <string>

namespace iptsd::apps::check {
namespace {

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

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

} // namespace
} // namespace iptsd::apps::check

int main(int argc, char **argv)
Expand Down
4 changes: 3 additions & 1 deletion src/apps/daemon/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
#include <string>

namespace iptsd::apps::daemon {
namespace {

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

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

} // namespace
} // namespace iptsd::apps::daemon

int main(int argc, char **argv)
Expand Down
4 changes: 3 additions & 1 deletion src/apps/dump/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
#include <string>

namespace iptsd::apps::dump {
namespace {

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

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

} // namespace
} // namespace iptsd::apps::dump

int main(int argc, char **argv)
Expand Down
4 changes: 3 additions & 1 deletion src/apps/perf/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
#include <string>

namespace iptsd::apps::perf {
namespace {

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

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

} // namespace
} // namespace iptsd::apps::perf

int main(int argc, char **argv)
Expand Down
4 changes: 3 additions & 1 deletion src/apps/visualization/plot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
#include <string>

namespace iptsd::apps::visualization::plot {
namespace {

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

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

} // namespace
} // namespace iptsd::apps::visualization::plot

int main(int argc, char **argv)
Expand Down
4 changes: 3 additions & 1 deletion src/apps/visualization/show.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
#include <string>

namespace iptsd::apps::visualization::show {
namespace {

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

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

} // namespace
} // namespace iptsd::apps::visualization::show

int main(int argc, char **argv)
Expand Down

0 comments on commit 4930a12

Please sign in to comment.