From: Arnaud Giersch Date: Fri, 19 Apr 2019 12:19:12 +0000 (+0200) Subject: Revise to fool cppcheck. X-Git-Tag: v3.22.2~70 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e2f4c322102dab25d663a761157720cbbb11702d?hp=bb6c8b49153f1b4f9280217572d86dc78dcb09f3 Revise to fool cppcheck. --- diff --git a/src/instr/instr_paje_types.cpp b/src/instr/instr_paje_types.cpp index 149d426186..ff0c4b5b72 100644 --- a/src/instr/instr_paje_types.cpp +++ b/src/instr/instr_paje_types.cpp @@ -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(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) { diff --git a/src/xbt/config.cpp b/src/xbt/config.cpp index b4d7e54236..0ac0581661 100644 --- a/src/xbt/config.cpp +++ b/src/xbt/config.cpp @@ -275,7 +275,7 @@ public: TypedConfigurationElement* variable = new TypedConfigurationElement(name, std::forward(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(variable)); + options[name].reset(variable); variable->update(); return variable; }