Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Use bool instead of int for match_pairs
authorGabriel Corona <gabriel.corona@loria.fr>
Fri, 6 May 2016 09:06:18 +0000 (11:06 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Fri, 6 May 2016 09:06:18 +0000 (11:06 +0200)
src/mc/compare.cpp

index ee31b80..1596039 100644 (file)
@@ -1016,7 +1016,7 @@ int compare_heap_area(simgrid::mc::StateComparator& state, int process_index,
   int new_size1 = -1, new_size2 = -1;
   simgrid::mc::Type *new_type1 = nullptr, *new_type2 = nullptr;
 
-  int match_pairs = 0;
+  bool match_pairs = false;
 
   // This is the address of std_heap->heapinfo in the application process:
   void* heapinfo_address = &((xbt_mheap_t) process->heap_address)->heapinfo;
@@ -1031,7 +1031,7 @@ int compare_heap_area(simgrid::mc::StateComparator& state, int process_index,
   simgrid::mc::HeapLocationPairs current;
   if (previous == nullptr) {
     previous = &current;
-    match_pairs = 1;
+    match_pairs = true;
   }
 
   // Get block number: