mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-04 01:39:16 +08:00
NthItemTest: Add definition for virtual destructor
This fixes a compiler warning from clang: unittest/nthitem_test.cc:22:7: warning: 'NthItemTest' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Wweak-vtables] Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
80c1235c12
commit
5178142ab1
@ -21,6 +21,7 @@ int test_data[] = { 8, 1, 2, -4, 7, 9, 65536, 4, 9, 0, -32767, 6, 7};
|
||||
// The fixture for testing GenericHeap and DoublePtr.
|
||||
class NthItemTest : public testing::Test {
|
||||
public:
|
||||
virtual ~NthItemTest();
|
||||
// Pushes the test data onto the KDVector.
|
||||
void PushTestData(KDVector* v) {
|
||||
for (int i = 0; i < ARRAYSIZE(test_data); ++i) {
|
||||
@ -30,6 +31,11 @@ class NthItemTest : public testing::Test {
|
||||
}
|
||||
};
|
||||
|
||||
// Destructor.
|
||||
// It is defined here, so the compiler can create a single vtable
|
||||
// instead of a weak vtable (fixes compiler warning).
|
||||
NthItemTest::~NthItemTest() = default;
|
||||
|
||||
// Tests basic results.
|
||||
TEST_F(NthItemTest, GeneralTest) {
|
||||
KDVector v;
|
||||
|
Loading…
Reference in New Issue
Block a user