]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/inspect/LocationList.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
bump C++ to 14 in smpicxx as well
[simgrid.git] / src / mc / inspect / LocationList.cpp
index a370ac7c577162abaf434f803c6794f05672d20a..212c25e9fb5b0ecb2186b4e4999d8945fc8894b8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2020. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -65,7 +65,7 @@ LocationList location_list(const simgrid::mc::ObjectInformation& info, Dwarf_Att
 {
   LocationList locations;
   std::ptrdiff_t offset = 0;
-  while (1) {
+  while (true) {
     Dwarf_Addr base;
     Dwarf_Addr start;
     Dwarf_Addr end;
@@ -79,7 +79,7 @@ LocationList location_list(const simgrid::mc::ObjectInformation& info, Dwarf_Att
     else if (offset == -1)
       xbt_die("Error while loading location list");
 
-    std::uint64_t base_address = (std::uint64_t)info.base_address();
+    auto base_address = reinterpret_cast<std::uint64_t>(info.base_address());
 
     LocationListEntry::range_type range;
     if (start == 0)