mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-28 05:39:35 +08:00
Merge pull request #353 from pnordhus/remove_dawgpositionvector_dtor
Remove redundant destructor
This commit is contained in:
commit
3c0c54f059
@ -375,14 +375,6 @@ struct DawgPosition {
|
||||
|
||||
class DawgPositionVector : public GenericVector<DawgPosition> {
|
||||
public:
|
||||
/// Overload destructor, since clear() does not delete data_[] any more.
|
||||
~DawgPositionVector() {
|
||||
if (size_reserved_ > 0) {
|
||||
delete[] data_;
|
||||
size_used_ = 0;
|
||||
size_reserved_ = 0;
|
||||
}
|
||||
}
|
||||
/// Overload clear() in order to avoid allocating/deallocating memory
|
||||
/// when clearing the vector and re-inserting entries into it later.
|
||||
void clear() { size_used_ = 0; }
|
||||
|
Loading…
Reference in New Issue
Block a user