Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use 'using-declarations' to inherit constructors.
[simgrid.git] / src / mc / inspect / DwarfExpression.hpp
index 811bbb0..3a94b47 100644 (file)
@@ -34,26 +34,26 @@ namespace dwarf {
  *  just a sequence of dwarf instructions. We currently directly use
  *  `Dwarf_Op` from `dwarf.h` for dwarf instructions.
  */
-typedef std::vector<Dwarf_Op> DwarfExpression;
+using DwarfExpression = std::vector<Dwarf_Op>;
 
 /** Context of evaluation of a DWARF expression
  *
  *  Some DWARF instructions need to read the CPU registers,
- *  the process memory, etc. All those informations are gathered in
+ *  the process memory, etc. All those information are gathered in
  *  the evaluation context.
  */
 struct ExpressionContext {
   /** CPU state (registers) */
-  unw_cursor_t* cursor                           = nullptr;
-  void* frame_base                               = nullptr;
-  const simgrid::mc::AddressSpace* address_space = nullptr; /** Address space used to read memory */
-  simgrid::mc::ObjectInformation* object_info    = nullptr;
+  unw_cursor_t* cursor                  = nullptr;
+  void* frame_base                      = nullptr;
+  const mc::AddressSpace* address_space = nullptr; /** Address space used to read memory */
+  mc::ObjectInformation* object_info    = nullptr;
 };
 
 /** When an error happens in the execution of a DWARF expression */
 class evaluation_error : public std::runtime_error {
 public:
-  explicit evaluation_error(const char* what) : std::runtime_error(what) {}
+  using std::runtime_error::runtime_error;
 };
 
 /** A stack for evaluating a DWARF expression
@@ -62,7 +62,7 @@ public:
  */
 class ExpressionStack {
 public:
-  typedef std::uintptr_t value_type;
+  using value_type                  = std::uintptr_t;
   static const std::size_t max_size = 64;
 
 private: