Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Member initialization in Variable, Member, Type
[simgrid.git] / src / mc / Variable.hpp
index 31f49c9..5b82b6c 100644 (file)
 
 #include <xbt/base.h>
 
-#include "mc_forward.h"
-#include "mc_location.h"
+#include "src/mc/mc_forward.h"
+#include "src/mc/LocationList.hpp"
 
 namespace simgrid {
 namespace mc {
 
+/** A variable (global or local) in the model-checked program */
 class Variable {
 public:
-  Variable();
-
-  unsigned dwarf_offset; /* Global offset of the field. */
-  int global;
+  Variable() {}
+  unsigned dwarf_offset = 0; /* Global offset of the field. */
+  int global = 0;
   std::string name;
-  unsigned type_id;
-  simgrid::mc::Type* type;
-
+  unsigned type_id = 0;
+  simgrid::mc::Type* type = nullptr;
   // Use either of:
-  simgrid::mc::LocationList location_list;
-  void* address;
-
-  size_t start_scope;
-  simgrid::mc::ObjectInformation* object_info;
+  simgrid::dwarf::LocationList location_list;
+  void* address = nullptr;
+  size_t start_scope = 0;
+  simgrid::mc::ObjectInformation* object_info = nullptr;
 };
 
-inline
-Variable::Variable()
-{
-  this->dwarf_offset = 0;
-  this->global = 0;
-  this->type = nullptr;
-  this->type_id = 0;
-  this->address = nullptr;
-  this->start_scope = 0;
-  this->object_info = nullptr;
-}
-
 }
 }