Gems/EMotionFX/Code/EMotionFX/Source/MotionLayerSystem.cpp
size_t MotionLayerSystem::FindInsertPos(size_t priorityLevel) const
    {
        const auto* foundInsertPosition = AZStd::lower_bound(begin(m_motionInstances), end(m_motionInstances), priorityLevel, [](const MotionInstance* motionInstance, size_t level)
        {
            return motionInstance->GetPriorityLevel() < level;
        });
        return foundInsertPosition != end(m_motionInstances) ? AZStd::distance(begin(m_motionInstances), foundInsertPosition) : InvalidIndex;
    }
// find the location where to insert a new motion with a given priority
find the location where to insert a new motion with a given priority
find the location where to insert a new motion with a given priority
size_t MotionLayerSystem::FindInsertPos(size_t priorityLevel) const
    {
        const auto* foundInsertPosition = AZStd::lower_bound(begin(m_motionInstances), end(m_motionInstances), priorityLevel, [](const MotionInstance* motionInstance, size_t level)
        {
            return motionInstance->GetPriorityLevel() < level;
        });
        return foundInsertPosition != end(m_motionInstances) ? AZStd::distance(begin(m_motionInstances), foundInsertPosition) : InvalidIndex;
    }
size_t MotionLayerSystem :: FindInsertPos ( size_t priorityLevel ) const { const auto * foundInsertPosition = AZStd :: lower_bound ( begin ( m_motionInstances ) , end ( m_motionInstances ) , priorityLevel , [ ] ( const MotionInstance * motionInstance , size_t level ) { return motionInstance -> GetPriorityLevel ( ) < level ; } ) ; return foundInsertPosition != end ( m_motionInstances ) ? AZStd :: distance ( begin ( m_motionInstances ) , foundInsertPosition ) : InvalidIndex ; }
find the location where to insert a new motion with a given priority
find the location where to insert a new motion with a given priority