fix: unify virtual/override keyword usage in destructors#1763
Open
LHT129 wants to merge 1 commit intoantgroup:mainfrom
Hidden character warning
The head ref may contain hidden characters: "2026-03-27-\u7edf\u4e00-virtual-override-\u5173\u952e\u5b57\u4f7f\u7528"
Open
fix: unify virtual/override keyword usage in destructors#1763LHT129 wants to merge 1 commit intoantgroup:mainfrom
LHT129 wants to merge 1 commit intoantgroup:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds explicit override specifiers to destructors in two InnerIndexInterface implementations (SINDI and Pyramid) to enforce correct virtual overriding at compile time.
Changes:
- Mark
~SINDI()asoverride = default - Mark
~Pyramid()asoverride = default
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/algorithm/sindi/sindi.h | Adds override to SINDI destructor to explicitly override InnerIndexInterface’s virtual destructor. |
| src/algorithm/pyramid.h | Adds override to Pyramid destructor to explicitly override InnerIndexInterface’s virtual destructor. |
- Add override to destructors in DiskANN, FP32Quantizer, INT8Quantizer - Remove redundant virtual keyword in MRLETransformer, RandomOrthogonalMatrix - Follow C++ Core Guidelines C.128: use only override for overriding functions Signed-off-by: LHT (glm-5) <agent@vsag.dev> Signed-off-by: LHT129 <tianlan.lht@antgroup.com>
fc6a144 to
e72fb20
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Unify virtual/override keyword usage in destructors following C++ Core Guidelines C.128.
Changes
overrideto destructors inDiskANN,FP32Quantizer,INT8Quantizer,SINDI,Pyramidvirtualkeyword inMRLETransformer,RandomOrthogonalMatrixFiles Changed
Testing
make releasepassedChecklist