From 2bc3fba4a92a1eca90ae2d1c073b31a08afc558a Mon Sep 17 00:00:00 2001 From: prinsij <prinsij@mcmaster.ca> Date: Fri, 21 Oct 2016 11:19:14 -0500 Subject: [PATCH] add virtual destructor to feature for polymorphism --- src/feature.cpp | 2 ++ src/include/feature.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/feature.cpp b/src/feature.cpp index 05444d3..36f871f 100644 --- a/src/feature.cpp +++ b/src/feature.cpp @@ -12,3 +12,5 @@ char Feature::getSymbol() { Coord Feature::getLocation() { return this->location; } + +Feature::~Feature() {} diff --git a/src/include/feature.h b/src/include/feature.h index 6a88544..6e4b42b 100644 --- a/src/include/feature.h +++ b/src/include/feature.h @@ -7,6 +7,7 @@ class Feature { Feature(char, Coord); char getSymbol(); Coord getLocation(); + virtual ~Feature(); private: Coord location; char symbol; -- GitLab