Skip to content

Commit

Permalink
AI/Contexts: deployed std::make_shared in a place I missed
Browse files Browse the repository at this point in the history
(cherry-picked from commit 18d597e)
  • Loading branch information
Vultraz committed Oct 7, 2018
1 parent bd5010a commit 53fb426
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ai/contexts.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit 53fb426

Please sign in to comment.