MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / TryDynamicCastPtr

Function TryDynamicCastPtr

tests/navigation_test.cpp:169–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167
168template <typename Original, typename Casted>
169void TryDynamicCastPtr(Original* ptr, Casted*& destination)
170{
171 if(dynamic_cast<Casted*>(ptr) != nullptr)
172 {
173 destination = dynamic_cast<Casted*>(ptr);
174 }
175}
176
177} // namespace
178

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected