mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-05 02:47:00 +08:00
Dawg: Define virtual destructor in .cpp file
This fixes compiler warnings from clang: src/dict/dawg.h:119:7: warning: 'Dawg' 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
ac8afc57bb
commit
0d211f9ed5
@ -42,6 +42,11 @@
|
||||
----------------------------------------------------------------------*/
|
||||
namespace tesseract {
|
||||
|
||||
// Destructor.
|
||||
// It is defined here, so the compiler can create a single vtable
|
||||
// instead of weak vtables in every compilation unit.
|
||||
Dawg::~Dawg() = default;
|
||||
|
||||
bool Dawg::prefix_in_dawg(const WERD_CHOICE &word,
|
||||
bool requires_complete) const {
|
||||
if (word.length() == 0) return !requires_complete;
|
||||
|
@ -129,7 +129,7 @@ class Dawg {
|
||||
inline const STRING &lang() const { return lang_; }
|
||||
inline PermuterType permuter() const { return perm_; }
|
||||
|
||||
virtual ~Dawg() = default;
|
||||
virtual ~Dawg();
|
||||
|
||||
/// Returns true if the given word is in the Dawg.
|
||||
bool word_in_dawg(const WERD_CHOICE &word) const;
|
||||
|
Loading…
Reference in New Issue
Block a user