From be8546e31a9c5e496c985a95cd767e03d0bf8fa3 Mon Sep 17 00:00:00 2001
From: Cedric Caffy <cedric.caffy@cern.ch>
Date: Tue, 12 May 2020 18:42:56 +0200
Subject: [PATCH] Modified DesiredDriveState object for valgind tests to pass

---
 common/dataStructures/DesiredDriveState.cpp | 2 ++
 common/dataStructures/DesiredDriveState.hpp | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/common/dataStructures/DesiredDriveState.cpp b/common/dataStructures/DesiredDriveState.cpp
index f60b927695..ab93e8fb87 100644
--- a/common/dataStructures/DesiredDriveState.cpp
+++ b/common/dataStructures/DesiredDriveState.cpp
@@ -23,6 +23,8 @@ namespace cta {
 namespace common {
 namespace dataStructures {
 
+DesiredDriveState::DesiredDriveState():up(false),forceDown(false){}  
+  
 DesiredDriveState::DesiredDriveState(const DesiredDriveState& ds) {
   if(this != &ds){
     up = ds.up;
diff --git a/common/dataStructures/DesiredDriveState.hpp b/common/dataStructures/DesiredDriveState.hpp
index 87879118b7..bfd9b411d8 100644
--- a/common/dataStructures/DesiredDriveState.hpp
+++ b/common/dataStructures/DesiredDriveState.hpp
@@ -30,7 +30,9 @@ namespace dataStructures {
  * The values are reset to all false when the drive goes down (including
  * at startup).
  */
-struct DesiredDriveState {
+class DesiredDriveState {
+public:
+  DesiredDriveState();
   DesiredDriveState(const DesiredDriveState & ds);
   DesiredDriveState & operator=(const DesiredDriveState & ds);
   bool up;        ///< Should the drive be up?
@@ -40,7 +42,6 @@ struct DesiredDriveState {
   bool operator==(const DesiredDriveState &rhs) const {
     return up == rhs.up && forceDown == rhs.forceDown;
   }
-  DesiredDriveState(){}
   static std::string c_tpsrvPrefixComment;
   void setReasonFromLogMsg(const int logLevel, const std::string & msg);
   static std::string generateReasonFromLogMsg(const int logLevel, const std::string & msg);
-- 
GitLab