Skip to content

Commit

Permalink
LTRResultIterator: Define virtual destructor in .cpp file
Browse files Browse the repository at this point in the history
This fixes compiler warnings from clang:

src/ccmain/ltrresultiterator.h:48:16: warning:
 'LTRResultIterator' has no out-of-line virtual method definitions;
 its vtable will be emitted in every translation unit [-Wweak-vtables]

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Sep 4, 2018
1 parent c635cdf commit d926655
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/ccmain/ltrresultiterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ LTRResultIterator::LTRResultIterator(PAGE_RES* page_res, Tesseract* tesseract,
paragraph_separator_("\n") {
}

LTRResultIterator::~LTRResultIterator() = default;

// Returns the null terminated UTF-8 encoded text string for the current
// object at the given level. Use delete [] to free after use.
char* LTRResultIterator::GetUTF8Text(PageIteratorLevel level) const {
Expand Down
2 changes: 1 addition & 1 deletion src/ccmain/ltrresultiterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class TESS_API LTRResultIterator : public PageIterator {
int rect_left, int rect_top,
int rect_width, int rect_height);

virtual ~LTRResultIterator() = default;
virtual ~LTRResultIterator();

// LTRResultIterators may be copied! This makes it possible to iterate over
// all the objects at a lower level, while maintaining an iterator to
Expand Down

0 comments on commit d926655

Please sign in to comment.