fix rfind
This commit is contained in:
@ -108,28 +108,28 @@ namespace ia
|
|||||||
{
|
{
|
||||||
for(size_type i = offset; i < Base::m_count; i++)
|
for(size_type i = offset; i < Base::m_count; i++)
|
||||||
if(!c(Base::m_data[i])) return { &Base::m_data[i] };
|
if(!c(Base::m_data[i])) return { &Base::m_data[i] };
|
||||||
return end();
|
return Base::end();
|
||||||
}
|
}
|
||||||
|
|
||||||
define_const_member_function(__ia__identifier::const_iterator, crfind, IN comparator_type c, IN size_type offset)
|
define_const_member_function(__ia__identifier::const_iterator, crfind, IN comparator_type c, IN size_type offset)
|
||||||
{
|
{
|
||||||
for(ssize_type i = Base::m_count - 1; i >= offset; i--)
|
for(ssize_type i = (ssize_type)Base::m_count - offset - 1; i >= 0; i--)
|
||||||
if(!c(Base::m_data[i])) return { &Base::m_data[i] };
|
if(!c(Base::m_data[i])) return { &Base::m_data[i] };
|
||||||
return end();
|
return Base::end();
|
||||||
}
|
}
|
||||||
|
|
||||||
define_const_member_function(template<typename compare_type> __ia__identifier::const_iterator, cfind, IN CONST compare_type& v, IN size_type offset)
|
define_const_member_function(template<typename compare_type> __ia__identifier::const_iterator, cfind, IN CONST compare_type& v, IN size_type offset)
|
||||||
{
|
{
|
||||||
for(size_type i = offset; i < Base::m_count; i++)
|
for(size_type i = offset; i < Base::m_count; i++)
|
||||||
if(v == Base::m_data[i]) return { &Base::m_data[i] };
|
if(v == Base::m_data[i]) return { &Base::m_data[i] };
|
||||||
return end();
|
return Base::end();
|
||||||
}
|
}
|
||||||
|
|
||||||
define_const_member_function(template<typename compare_type> __ia__identifier::const_iterator, crfind, IN CONST compare_type& v, IN size_type offset)
|
define_const_member_function(template<typename compare_type> __ia__identifier::const_iterator, crfind, IN CONST compare_type& v, IN size_type offset)
|
||||||
{
|
{
|
||||||
for(ssize_type i = Base::m_count - 1; i >= offset; i--)
|
for(ssize_type i = (ssize_type)Base::m_count - offset - 1; i >= 0; i--)
|
||||||
if(v == Base::m_data[i]) return { &Base::m_data[i] };
|
if(v == Base::m_data[i]) return { &Base::m_data[i] };
|
||||||
return end();
|
return Base::end();
|
||||||
}
|
}
|
||||||
|
|
||||||
define_const_member_function(BOOL, contains, IN comparator_type v)
|
define_const_member_function(BOOL, contains, IN comparator_type v)
|
||||||
|
|||||||
Reference in New Issue
Block a user