From 83aa39b9a2c1bd38bb8e2f2901085a12bd04a932 Mon Sep 17 00:00:00 2001
From: tobiglaser <76131623+tobiglaser@users.noreply.github.com>
Date: Tue, 2 Aug 2022 17:58:34 +0200
Subject: [PATCH] Correction: ICommand inhereted virtually

---
 include/commandlib.h | 6 +++---
 src/Command.h        | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/commandlib.h b/include/commandlib.h
index 210b926..f7c8315 100644
--- a/include/commandlib.h
+++ b/include/commandlib.h
@@ -8,7 +8,7 @@ public:
     virtual std::string getName() = 0;
 };
 
-class IDirection
+class IDirection : public virtual ICommand
 {
 public:
     inline static const std::string direction = "Direction";
@@ -16,7 +16,7 @@ public:
     virtual int getDegree() = 0;
 };
 
-class IGear
+class IGear : public virtual ICommand
 {
 public:
     inline static const std::string gear = "Gear";
@@ -25,7 +25,7 @@ public:
     virtual double getDuration() = 0;
 };
 
-class IPause
+class IPause : public virtual ICommand
 {
 public:
     inline static const std::string pause = "Pause";
diff --git a/src/Command.h b/src/Command.h
index 7d17b62..c3850c4 100644
--- a/src/Command.h
+++ b/src/Command.h
@@ -7,7 +7,7 @@
  * @brief Base class for the specific Command implementations
  *  e.g. Gear, Direction and Pause.
  */
-class Command : public ICommand
+class Command : public virtual ICommand
 {
 private:
     std::string name;
-- 
GitLab