AI/Contexts: deployed std::make_shared in a place I missed
(cherry-picked from commit 18d597e374
)
This commit is contained in:
parent
bd5010aa78
commit
53fb426f4d
1 changed files with 2 additions and 4 deletions
|
@ -172,12 +172,10 @@ synced_command_result_ptr readonly_context_impl::check_synced_command_action(con
|
|||
return actions::execute_synced_command_action(get_side(),false,lua_code,location);
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
void readonly_context_impl::add_known_aspect(const std::string &name, typesafe_aspect_ptr<T>& where)
|
||||
void readonly_context_impl::add_known_aspect(const std::string& name, typesafe_aspect_ptr<T>& where)
|
||||
{
|
||||
std::shared_ptr< typesafe_known_aspect <T>> ka_ptr(new typesafe_known_aspect<T>(name,where,aspects_));
|
||||
known_aspects_.emplace(name,ka_ptr);
|
||||
known_aspects_.emplace(name, std::make_shared<typesafe_known_aspect<T>>(name, where, aspects_));
|
||||
}
|
||||
|
||||
readonly_context_impl::readonly_context_impl(side_context &context, const config &cfg)
|
||||
|
|
Loading…
Add table
Reference in a new issue