Skip to content

Fix warnings around usage of virtual. #713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2024
Merged

Conversation

skottmckay
Copy link
Contributor

Fix warnings like this:

D:/Android/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/memory:2427:5: warning: delete called on 'Ort::Custom::IStringTensorStorage<std::basic_string_view<char>>' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
    delete __ptr;
    ^
...
D:/Android/ndk/25.1.8937393/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/c++/v1/memory:2427:5: warning: delete called on 'Ort::Custom::ITensorStorage' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
    delete __ptr;

Cleanup virtual/override usage.
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rh-override
isocpp/CppCoreGuidelines#1448

@skottmckay skottmckay requested a review from a team as a code owner May 10, 2024 03:35
Copy link
Contributor

@wenbingl wenbingl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing.
Is it possible that we can setup a pipeline for detecting this kind of style issue?

@skottmckay skottmckay merged commit beb9fbb into main May 13, 2024
@skottmckay skottmckay deleted the skottmckay/FixWarnings branch May 13, 2024 00:14
@skottmckay
Copy link
Contributor Author

Possibly it's just a case of setting 'warnings as errors' to detect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants