Merge pull request #353 from pnordhus/remove_dawgpositionvector_dtor

Remove redundant destructor
This commit is contained in:
zdenop 2016-12-08 13:04:58 +01:00 committed by GitHub
commit 3c0c54f059

View File

@ -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; }