From 9d7264ffed8e245a362261886ed1b4c395727d55 Mon Sep 17 00:00:00 2001
From: Michael Krisper <michael.krisper@tugraz.at>
Date: Tue, 19 Jul 2022 08:35:59 +0200
Subject: [PATCH] IUpdateable and minor changes to avoid compilation warnings

---
 .../VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs    | 2 +-
 VectoCore/VectoCore/Models/SimulationComponent/Impl/Clutch.cs | 2 +-
 .../VectoCore/Models/SimulationComponent/SwitchableClutch.cs  | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs
index 794bcf3a57..4b7a0cc978 100644
--- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs
+++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATGearbox.cs
@@ -582,7 +582,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 			public WattSecond PowershiftLossEnergy;
 			public NewtonMeter PowershiftLoss;
 
-			public ATGearboxState Clone() => (ATGearboxState)MemberwiseClone();
+			public new ATGearboxState Clone() => (ATGearboxState)MemberwiseClone();
 
 		}
 
diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Clutch.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Clutch.cs
index 83b97ab25e..d7d03ce19f 100644
--- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/Clutch.cs
+++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/Clutch.cs
@@ -256,7 +256,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
 
 		#region Implementation of IUpdateable
 
-		public bool UpdateFrom(object other) {
+		public virtual bool UpdateFrom(object other) {
 			if (other is Clutch c) {
 				PreviousState = c.PreviousState.Clone();
 				return true;
diff --git a/VectoCore/VectoCore/Models/SimulationComponent/SwitchableClutch.cs b/VectoCore/VectoCore/Models/SimulationComponent/SwitchableClutch.cs
index dd5b241a79..3cd054bcf8 100644
--- a/VectoCore/VectoCore/Models/SimulationComponent/SwitchableClutch.cs
+++ b/VectoCore/VectoCore/Models/SimulationComponent/SwitchableClutch.cs
@@ -9,7 +9,7 @@ using TUGraz.VectoCore.Models.SimulationComponent.Impl;
 
 namespace TUGraz.VectoCore.Models.SimulationComponent
 {
-	public class SwitchableClutch : Clutch, IUpdateable
+	public class SwitchableClutch : Clutch
 	{
 		public SwitchableClutch(IVehicleContainer container, CombustionEngineData engineData) : base(container, engineData) { }
 
@@ -145,7 +145,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent
 
 		#region Implementation of IUpdateable
 
-		public bool UpdateFrom(object other) {
+		public override bool UpdateFrom(object other) {
 			if (other is SwitchableClutch c) {
 				PreviousState = c.PreviousState.Clone();
 				ClutchOpen = c.ClutchOpen;
-- 
GitLab