From 87f01366b2e66a1eebf680f9cbb7da19d8b490fa Mon Sep 17 00:00:00 2001
From: Christoph Kochendoerfer <christoph.kochendoerfer@in-tech.com>
Date: Wed, 4 Aug 2021 16:26:54 +0200
Subject: [PATCH] added default initalization for variables

---
 .../MantleAPI/Traffic/entity_properties.h     | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/MantleAPI/include/MantleAPI/Traffic/entity_properties.h b/MantleAPI/include/MantleAPI/Traffic/entity_properties.h
index 3e02d0b6..12e75fdd 100644
--- a/MantleAPI/include/MantleAPI/Traffic/entity_properties.h
+++ b/MantleAPI/include/MantleAPI/Traffic/entity_properties.h
@@ -44,7 +44,7 @@ struct EntityProperties
     BoundingBox bounding_box{Vec3d{}, Dimension3d{}};
     EntityType type{EntityType::kOther};
     std::string model{};
-    std::map<std::string, std::string> properties;
+    std::map<std::string, std::string> properties{};
 };
 
 inline bool operator==(const EntityProperties& lhs, const EntityProperties& rhs) noexcept
@@ -119,11 +119,11 @@ enum class ExternalControlState
 struct Performance
 {
     // in m/s
-    double max_speed;
+    double max_speed{0.0};
     // in m/s²
-    double max_acceleration;
+    double max_acceleration{0.0};
     // in m/s²
-    double max_deceleration;
+    double max_deceleration{0.0};
 };
 
 inline bool operator==(const Performance& lhs, const Performance& rhs) noexcept
@@ -136,13 +136,13 @@ inline bool operator==(const Performance& lhs, const Performance& rhs) noexcept
 struct Axle
 {
     // in radian
-    double max_steering;
+    double max_steering{0.0};
     // in m
-    double wheel_diameter;
+    double wheel_diameter{0.0};
     // in m
-    double track_width;
+    double track_width{0.0};
     // in m
-    Vec3d bb_center_to_axle_center;
+    Vec3d bb_center_to_axle_center{};
 };
 
 inline bool operator==(const Axle& lhs, const Axle& rhs) noexcept
@@ -157,10 +157,10 @@ struct VehicleProperties : public EntityProperties
 {
     VehicleClass classification{VehicleClass::kOther};
 
-    Performance performance;
+    Performance performance{};
 
-    Axle front_axle;
-    Axle rear_axle;
+    Axle front_axle{};
+    Axle rear_axle{};
 
     bool is_host{false};
     // TODO: remove, once external control for traffic is implemented through controllers
-- 
GitLab