Skip to content
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

Add virtual dtor to RangeImage #3470

Closed
SergioRAgostinho opened this issue Nov 15, 2019 · 2 comments · Fixed by #3477
Closed

Add virtual dtor to RangeImage #3470

SergioRAgostinho opened this issue Nov 15, 2019 · 2 comments · Fixed by #3477
Labels
good first issue Skills/areas of expertise needed to tackle the issue module: common
Milestone

Comments

@SergioRAgostinho
Copy link
Member

This PR introduces the following warning:

../keypoints/src/narf_keypoint.cpp: In member function ‘void pcl::NarfKeypoint::clearData()’:
../keypoints/src/narf_keypoint.cpp:75:52: warning: deleting object of polymorphic class type ‘pcl::RangeImage’ which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
     delete range_image_scale_space_[scale_space_idx];                                                   

Originally posted by @taketwo in #3454 (comment)

@SergioRAgostinho
Copy link
Member Author

SergioRAgostinho commented Nov 15, 2019

We removed the dtor from PointCloud which was virtual. RangeImage inherited it from PointCloud. Since it was removed, RangeImage now needs its virtual dtor explicitly defined.

@SergioRAgostinho SergioRAgostinho added good first issue Skills/areas of expertise needed to tackle the issue module: common labels Nov 15, 2019
@taketwo
Copy link
Member

taketwo commented Nov 15, 2019

Ping @lightyear15

@SergioRAgostinho SergioRAgostinho added this to the pcl-1.10.0 milestone Nov 15, 2019
@SergioRAgostinho SergioRAgostinho changed the title Re-add virtual dtor Add virtual dtor to RangeImage Nov 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Skills/areas of expertise needed to tackle the issue module: common
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants