diff --git a/src/libslic3r/Config.cpp b/src/libslic3r/Config.cpp index c5754fb839..aea3f215ce 100644 --- a/src/libslic3r/Config.cpp +++ b/src/libslic3r/Config.cpp @@ -674,7 +674,7 @@ ConfigOption* DynamicConfig::optptr(const t_config_option_key &opt_key, bool cre // Let the parent decide what to do if the opt_key is not defined by this->def(). return nullptr; ConfigOption *opt = optdef->create_default_option(); - this->options.insert(it, std::make_pair(opt_key, opt)); + this->options.emplace_hint(it, opt_key, std::unique_ptr(opt)); return opt; }