From eab36a79b85b59fbbff75bf0dd748f877e94962e Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 8 May 2024 19:23:21 +0300 Subject: [w10] Added forgotten virtual keyword to certain destructors --- week10/Exercise07/FileString.h.gch | Bin 0 -> 2068739 bytes week10/Exercise07/String.h | 2 +- week10/Exercise08/Moderator.h | 2 +- week10/Exercise08/User.h | 2 +- week10/Exercise10/String.h | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 week10/Exercise07/FileString.h.gch (limited to 'week10') diff --git a/week10/Exercise07/FileString.h.gch b/week10/Exercise07/FileString.h.gch new file mode 100644 index 0000000..09aa698 Binary files /dev/null and b/week10/Exercise07/FileString.h.gch differ diff --git a/week10/Exercise07/String.h b/week10/Exercise07/String.h index 3ea986a..c622f5b 100644 --- a/week10/Exercise07/String.h +++ b/week10/Exercise07/String.h @@ -12,7 +12,7 @@ public: String(const char* str); String(); - ~String(); + virtual ~String(); String(const String& other); String& operator=(const String& other); String(String&& other); diff --git a/week10/Exercise08/Moderator.h b/week10/Exercise08/Moderator.h index 70296a4..2945ae7 100644 --- a/week10/Exercise08/Moderator.h +++ b/week10/Exercise08/Moderator.h @@ -10,7 +10,7 @@ protected: public: Moderator(); - ~Moderator(); + virtual ~Moderator(); Moderator(const Moderator& other); Moderator& operator=(const Moderator& other); Moderator(Moderator&& other); diff --git a/week10/Exercise08/User.h b/week10/Exercise08/User.h index 81a5fed..b6055a1 100644 --- a/week10/Exercise08/User.h +++ b/week10/Exercise08/User.h @@ -10,7 +10,7 @@ protected: public: User(); - ~User(); + virtual ~User(); User(const User& other); User& operator=(const User& other); User(User&& other); diff --git a/week10/Exercise10/String.h b/week10/Exercise10/String.h index 4ae55c0..d63bf96 100644 --- a/week10/Exercise10/String.h +++ b/week10/Exercise10/String.h @@ -9,7 +9,7 @@ protected: public: String(); - ~String(); + virtual ~String(); String(const String& other); String& operator=(const String& other); String(String&& other); -- cgit v1.2.3