Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Avoid costly exceptions when looking into a map.
[simgrid.git] / src / mc / mc_member.cpp
index a6f7e6d..ff4c77f 100644 (file)
@@ -16,20 +16,16 @@ namespace dwarf {
  * @param object   Process address of the struct/class
  * @param type     Type of the struct/class
  * @param member   Member description
- * @param snapshot Snapshot (or NULL)
+ * @param snapshot Snapshot (or nullptr)
  * @return Process address of the given member of the 'object' struct/class
  */
 void *resolve_member(
     const void *base, simgrid::mc::Type* type, simgrid::mc::Member* member,
     simgrid::mc::AddressSpace* address_space, int process_index)
 {
-  // TODO, get rid of this?
-  if (!member->has_offset_location())
-    return ((char *) base) + member->offset();
-
   ExpressionContext state;
-  state.frame_base = NULL;
-  state.cursor = NULL;
+  state.frame_base = nullptr;
+  state.cursor = nullptr;
   state.address_space = address_space;
   state.process_index = process_index;