From ecd5449f7bcdb5097ed943088084bf71ab45bec6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 10 Feb 2025 19:32:58 -0500 Subject: Put local utility functions in anonymous namespaces --- test/test_bitvec.cpp | 4 ++++ test/test_gray_code_rank.cpp | 4 ++++ test/test_hilbert.cpp | 4 ++++ 3 files changed, 12 insertions(+) (limited to 'test') diff --git a/test/test_bitvec.cpp b/test/test_bitvec.cpp index e03a27f..d25e3ff 100644 --- a/test/test_bitvec.cpp +++ b/test/test_bitvec.cpp @@ -16,6 +16,8 @@ #include #include +namespace { + template void test_and(Context& ctx) @@ -324,6 +326,8 @@ test(Context& ctx) test_iteration(ctx); } +} // namespace + int main() { diff --git a/test/test_gray_code_rank.cpp b/test/test_gray_code_rank.cpp index 1bb70cb..26432b8 100644 --- a/test/test_gray_code_rank.cpp +++ b/test/test_gray_code_rank.cpp @@ -19,6 +19,8 @@ #include #include +namespace { + template T get_mask(const std::array& ms, const size_t d, const size_t step) @@ -106,6 +108,8 @@ test(Context& ctx) test_gray_code_rank(ctx); } +} // namespace + int main() { diff --git a/test/test_hilbert.cpp b/test/test_hilbert.cpp index 53177ec..6a1862d 100644 --- a/test/test_hilbert.cpp +++ b/test/test_hilbert.cpp @@ -33,6 +33,8 @@ _Pragma("clang diagnostic pop") #include #include +namespace { + /// Return a `D`-dimensional point within `ms` per-dimension precision template std::array @@ -159,6 +161,8 @@ test_compact(Context& ctx) assert(squared_distance(pa, pb) == 1); } +} // namespace + int main() { -- cgit v1.2.1