Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics around std::unique_ptr.
[simgrid.git] / src / mc / compare.cpp
index 1f1512b..7149a71 100644 (file)
@@ -1236,6 +1236,7 @@ static int compare_areas_with_type(simgrid::mc::StateComparator& state,
   int res;
 
   do {
+    xbt_assert(type != nullptr);
     switch (type->type) {
       case DW_TAG_unspecified_type:
         return 1;
@@ -1479,7 +1480,7 @@ int snapshot_compare(int num1, simgrid::mc::Snapshot* s1, int num2, simgrid::mc:
   // TODO, make this a field of ModelChecker or something similar
 
   if (state_comparator == nullptr)
-    state_comparator = std::unique_ptr<StateComparator>(new StateComparator());
+    state_comparator.reset(new StateComparator());
   else
     state_comparator->clear();