Fix virtual destructors (#1453)
This is necessary because otherwise derived classes are potentially deleted incompletely, using the destructor of the interface.master
parent
ceddabbcbb
commit
5253186cbe
|
@ -25,6 +25,8 @@ namespace mapping {
|
||||||
|
|
||||||
class GridInterface {
|
class GridInterface {
|
||||||
// todo(kdaun) move mutual functions of Grid2D/3D here
|
// todo(kdaun) move mutual functions of Grid2D/3D here
|
||||||
|
public:
|
||||||
|
virtual ~GridInterface() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace mapping
|
} // namespace mapping
|
||||||
|
|
|
@ -32,6 +32,8 @@ proto::RangeDataInserterOptions CreateRangeDataInserterOptions(
|
||||||
|
|
||||||
class RangeDataInserterInterface {
|
class RangeDataInserterInterface {
|
||||||
public:
|
public:
|
||||||
|
virtual ~RangeDataInserterInterface() {}
|
||||||
|
|
||||||
// Inserts 'range_data' into 'grid'.
|
// Inserts 'range_data' into 'grid'.
|
||||||
virtual void Insert(const sensor::RangeData& range_data,
|
virtual void Insert(const sensor::RangeData& range_data,
|
||||||
GridInterface* grid) const = 0;
|
GridInterface* grid) const = 0;
|
||||||
|
|
Loading…
Reference in New Issue