From f371789b40af052a33ad348b722a5c27f14b4c02 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 28 May 2022 04:02:36 -0600 Subject: [PATCH] Sprinkle static around --- perf/benchmark-font.cc | 4 ++-- perf/benchmark-shape.cc | 4 ++-- test/threads/hb-shape-threads.cc | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/perf/benchmark-font.cc b/perf/benchmark-font.cc index 89651673d..86282d6de 100644 --- a/perf/benchmark-font.cc +++ b/perf/benchmark-font.cc @@ -30,8 +30,8 @@ struct test_input_t {false, SUBSET_FONT_BASE_PATH "NotoSerifMyanmar-Regular.otf"}, }; -test_input_t *tests = default_tests; -unsigned num_tests = sizeof (default_tests) / sizeof (default_tests[0]); +static test_input_t *tests = default_tests; +static unsigned num_tests = sizeof (default_tests) / sizeof (default_tests[0]); enum backend_t { HARFBUZZ, FREETYPE }; diff --git a/perf/benchmark-shape.cc b/perf/benchmark-shape.cc index 085da5d42..2f6e8682b 100644 --- a/perf/benchmark-shape.cc +++ b/perf/benchmark-shape.cc @@ -55,8 +55,8 @@ struct test_input_t true}, }; -test_input_t *tests = default_tests; -unsigned num_tests = sizeof (default_tests) / sizeof (default_tests[0]); +static test_input_t *tests = default_tests; +static unsigned num_tests = sizeof (default_tests) / sizeof (default_tests[0]); enum backend_t { HARFBUZZ, FREETYPE }; diff --git a/test/threads/hb-shape-threads.cc b/test/threads/hb-shape-threads.cc index bc74b7289..f8821a7d8 100644 --- a/test/threads/hb-shape-threads.cc +++ b/test/threads/hb-shape-threads.cc @@ -56,14 +56,14 @@ struct test_input_t true}, }; -test_input_t *tests = default_tests; -unsigned num_tests = sizeof (default_tests) / sizeof (default_tests[0]); +static test_input_t *tests = default_tests; +static unsigned num_tests = sizeof (default_tests) / sizeof (default_tests[0]); enum backend_t { HARFBUZZ, FREETYPE }; // https://en.cppreference.com/w/cpp/thread/condition_variable/wait -std::condition_variable cv; -std::mutex cv_m; +static std::condition_variable cv; +static std::mutex cv_m; static bool ready = false; static unsigned num_repetitions = 1;