From c3028edebab1d021d2d95a26beea3ccd58a4e28f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Tue, 10 Nov 2020 15:33:34 +0100 Subject: default destructors --- labb4/Junk.h | 2 +- labb4/Robot.h | 2 +- labb4/Unit.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/labb4/Junk.h b/labb4/Junk.h index 8e3c357..2483233 100644 --- a/labb4/Junk.h +++ b/labb4/Junk.h @@ -13,7 +13,7 @@ class Junk : public Robot { public: Junk(); Junk(Robot c); - ~Junk() {} + ~Junk() = default; /* * Draws this junk onto the given QGraphicsScene. diff --git a/labb4/Robot.h b/labb4/Robot.h index 224b742..74ad592 100644 --- a/labb4/Robot.h +++ b/labb4/Robot.h @@ -12,7 +12,7 @@ class Robot : public Unit { public: Robot(); - virtual ~Robot() {}; + virtual ~Robot() = default; virtual void draw(QGraphicsScene* scene) const; /* diff --git a/labb4/Unit.h b/labb4/Unit.h index 65e5db0..b092e39 100644 --- a/labb4/Unit.h +++ b/labb4/Unit.h @@ -16,6 +16,7 @@ public: Unit(); Unit(const Unit& u); Unit(const Point& p); + virtual ~Unit() = default; /* * Return Point representation of Unit -- cgit v1.2.1