From a702f2d2aaa1a113b296675655c4fa3d895099f4 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 21 Jan 2019 21:31:30 +0100 Subject: [PATCH] unittest: Replace ABSL_ARRAYSIZE by ARRAYSIZE Remove the local definition of ABSL_ARRAYSIZE to avoid a conflict with Abseil. Signed-off-by: Stefan Weil --- unittest/include_gunit.h | 3 --- unittest/stats_test.cc | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/unittest/include_gunit.h b/unittest/include_gunit.h index ce911b0de6..4b5bc0f989 100644 --- a/unittest/include_gunit.h +++ b/unittest/include_gunit.h @@ -50,9 +50,6 @@ class file : public tesseract::File { } }; -#if !defined(ABSL_ARRAYSIZE) -#define ABSL_ARRAYSIZE(arr) (sizeof(arr) / sizeof(arr[0])) -#endif #define ARRAYSIZE(arr) (sizeof(arr) / sizeof(arr[0])) #define CHECK(test) ASSERT_HOST(test) #define CHECK_GT(test, value) ASSERT_HOST((test) > (value)) diff --git a/unittest/stats_test.cc b/unittest/stats_test.cc index 691af962ed..6144223971 100644 --- a/unittest/stats_test.cc +++ b/unittest/stats_test.cc @@ -23,7 +23,7 @@ class STATSTest : public testing::Test { public: void SetUp() { stats_.set_range(0, 16); - for (int i = 0; i < ABSL_ARRAYSIZE(kTestData); ++i) + for (int i = 0; i < ARRAYSIZE(kTestData); ++i) stats_.add(i, kTestData[i]); }