From 6ad9ef4bb0221fa2f7a3b1e7a789b653fdd88506 Mon Sep 17 00:00:00 2001 From: minmingong Date: Fri, 20 Dec 2024 12:42:21 -0800 Subject: [PATCH] Add a virtual destructor to genericPoint As a class that mean to be inherited, a virtual destrustor is necessary for polymorphism. --- include/implicit_point.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/implicit_point.h b/include/implicit_point.h index 3edbf99..de3fe1f 100644 --- a/include/implicit_point.h +++ b/include/implicit_point.h @@ -65,6 +65,7 @@ class genericPoint { public: genericPoint(const Point_Type& t) : type(t) {} + virtual ~genericPoint() = default; Point_Type getType() const { return type; } bool is2D() const { return type <= SSI; }