Skip to content

Commit 24fdf21

Browse files
committed
Use original typeid for shared_ptr types in TypeInfo::Create()
1 parent 423e970 commit 24fdf21

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

include/behaviortree_cpp/basic_types.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,7 @@ class TypeInfo
368368
using Chain = compute_base_chain<Elem>;
369369
auto base_chain = to_type_index_vector(Chain{});
370370

371-
return TypeInfo(typeid(std::shared_ptr<RootBase>),
372-
GetAnyFromStringFunctor<std::shared_ptr<RootBase>>(),
373-
std::move(base_chain));
371+
return TypeInfo(typeid(T), GetAnyFromStringFunctor<T>(), std::move(base_chain);
374372
}
375373
}
376374
return TypeInfo{ typeid(T), GetAnyFromStringFunctor<T>() };

0 commit comments

Comments
 (0)