From e2f4c322102dab25d663a761157720cbbb11702d Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Fri, 19 Apr 2019 14:19:12 +0200 Subject: [PATCH 1/1] Revise to fool cppcheck. --- src/instr/instr_paje_types.cpp | 2 +- src/xbt/config.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.20.1