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

Function FindAnimation

engine/gui/src/gui.cpp:1849–1860  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1847 }
1848
1849 static inline uint32_t FindAnimation(dmArray<Animation>& animations, float* value)
1850 {
1851 Animation* begin = animations.Begin();
1852 Animation* end = animations.End();
1853 Animation* anim = std::lower_bound(begin, end, value, AnimCompare);
1854
1855 if (anim != end && anim->m_Value == value)
1856 {
1857 return (uint32_t)(anim - begin);
1858 }
1859 return 0xffffffff;
1860 }
1861
1862 // This function assumes the size of the array has already grown 1 element
1863 static inline uint32_t InsertAnimation(dmArray<Animation>& animations, Animation* anim)

Callers 1

AnimateComponentFunction · 0.70

Calls 2

BeginMethod · 0.45
EndMethod · 0.45

Tested by

no test coverage detected