Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revise to fool cppcheck.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 19 Apr 2019 12:19:12 +0000 (14:19 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 19 Apr 2019 13:40:36 +0000 (15:40 +0200)
src/instr/instr_paje_types.cpp
src/xbt/config.cpp

index 149d426..ff0c4b5 100644 (file)
@@ -22,7 +22,7 @@ Type::Type(const std::string& name, const std::string& alias, const std::string&
     THROWF(tracing_error, 0, "can't create a new type with no name or alias");
 
   if (father != nullptr){
-    father->children_.emplace(alias, std::unique_ptr<Type>(this));
+    father->children_[alias].reset(this);
     XBT_DEBUG("new type %s, child of %s", get_cname(), father->get_cname());
   }
   if (trace_format == simgrid::instr::TraceFormat::Paje) {
index b4d7e54..0ac0581 100644 (file)
@@ -275,7 +275,7 @@ public:
     TypedConfigurationElement<T>* variable = new TypedConfigurationElement<T>(name, std::forward<A>(a)...);
     XBT_DEBUG("Register cfg elm %s (%s) of type %s @%p in set %p)", name.c_str(), variable->get_description().c_str(),
               variable->get_type_name(), variable, this);
-    options.emplace(name, std::unique_ptr<ConfigurationElement>(variable));
+    options[name].reset(variable);
     variable->update();
     return variable;
   }