mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-12 23:49:06 +08:00
MATRIX: Define virtual destructor in .cpp file
This fixes compiler warnings from clang: src/ccstruct/matrix.h:575:7: warning: 'MATRIX' 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
bde8f08003
commit
14c23c9f13
@ -32,6 +32,11 @@
|
||||
#include "tprintf.h"
|
||||
#include "unicharset.h"
|
||||
|
||||
// Destructor.
|
||||
// It is defined here, so the compiler can create a single vtable
|
||||
// instead of weak vtables in every compilation unit.
|
||||
MATRIX::~MATRIX() = default;
|
||||
|
||||
// Returns true if there are any real classification results.
|
||||
bool MATRIX::Classified(int col, int row, int wildcard_id) const {
|
||||
if (get(col, row) == NOT_CLASSIFIED) return false;
|
||||
|
@ -577,6 +577,8 @@ class MATRIX : public BandTriMatrix<BLOB_CHOICE_LIST *> {
|
||||
MATRIX(int dimension, int bandwidth)
|
||||
: BandTriMatrix<BLOB_CHOICE_LIST *>(dimension, bandwidth, NOT_CLASSIFIED) {}
|
||||
|
||||
virtual ~MATRIX();
|
||||
|
||||
// Returns true if there are any real classification results.
|
||||
bool Classified(int col, int row, int wildcard_id) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user