diff --git a/.clang-tidy b/.clang-tidy index e8251bfcc..7ca30f365 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -18,7 +18,6 @@ Checks: > -misc-no-recursion, -misc-non-private-member-variables-in-classes, -misc-unused-parameters, - -misc-use-anonymous-namespace, -modernize-avoid-c-arrays, -modernize-loop-convert, -modernize-use-nodiscard, diff --git a/1stsamples/stl/main.cpp b/1stsamples/stl/main.cpp index 356784acf..f3a04339c 100644 --- a/1stsamples/stl/main.cpp +++ b/1stsamples/stl/main.cpp @@ -3,7 +3,9 @@ #include #include -static void Task(const std::string& msg) { std::cout << "thread number: " + msg << '\n'; } +namespace { +void Task(const std::string& msg) { std::cout << "thread number: " + msg << '\n'; } +} // namespace int main() { const auto num_max_threads = std::thread::hardware_concurrency(); diff --git a/1stsamples/tbb/main.cpp b/1stsamples/tbb/main.cpp index fc0a03731..d8058ea4b 100644 --- a/1stsamples/tbb/main.cpp +++ b/1stsamples/tbb/main.cpp @@ -2,7 +2,8 @@ #include -static int FibFunc(int n) { +namespace { +int FibFunc(int n) { if (n < 2) { return n; } @@ -14,5 +15,6 @@ static int FibFunc(int n) { g.wait(); return x + y; } +} // namespace int main() { return FibFunc(10) - 55; } diff --git a/tasks/stl/example/src/ops_stl.cpp b/tasks/stl/example/src/ops_stl.cpp index 04cb8a1ea..46cf82ddf 100644 --- a/tasks/stl/example/src/ops_stl.cpp +++ b/tasks/stl/example/src/ops_stl.cpp @@ -39,9 +39,10 @@ bool nesterov_a_test_task_stl::TestSTLTaskSequential::post_processing_impl() { return true; } -static std::mutex my_mutex; +namespace { +std::mutex my_mutex; -static void AtomOps(std::vector vec, const std::string &ops, std::promise &&pr) { +void AtomOps(std::vector vec, const std::string &ops, std::promise &&pr) { auto sz = vec.size(); int reduction_elem = 0; if (ops == "+") { @@ -57,6 +58,7 @@ static void AtomOps(std::vector vec, const std::string &ops, std::promise