MCPcopy Create free account
hub / github.com/comaps/comaps / FindAnimation

Method FindAnimation

libs/drape_frontend/animation_system.hpp:48–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46
47 template <typename T>
48 T const * FindAnimation(Animation::Type type, char const * customType = nullptr) const
49 {
50 for (auto & pList : m_animationChain)
51 {
52 auto & lst = *pList;
53 for (auto const & anim : lst)
54 {
55 if ((anim->GetType() == type) &&
56 (customType == nullptr || strcmp(anim->GetCustomType().c_str(), customType) == 0))
57 {
58 ASSERT(dynamic_cast<T const *>(anim.get()) != nullptr, ());
59 return static_cast<T const *>(anim.get());
60 }
61 }
62 }
63 return nullptr;
64 }
65
66 void Advance(double elapsedSeconds);
67

Callers

nothing calls this directly

Calls 4

ASSERTFunction · 0.85
getMethod · 0.65
GetTypeMethod · 0.45
GetCustomTypeMethod · 0.45

Tested by

no test coverage detected