From 89d9217b298bb251c229c264d079b423f69b0273 Mon Sep 17 00:00:00 2001 From: Isuru Samarathunga Date: Tue, 5 Aug 2025 03:19:58 +0530 Subject: [PATCH] fix rfind --- Src/IACore/imp/inl/iacore/container/fixed.inl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Src/IACore/imp/inl/iacore/container/fixed.inl b/Src/IACore/imp/inl/iacore/container/fixed.inl index 9a86400..3b9f3b3 100644 --- a/Src/IACore/imp/inl/iacore/container/fixed.inl +++ b/Src/IACore/imp/inl/iacore/container/fixed.inl @@ -108,28 +108,28 @@ namespace ia { for(size_type i = offset; i < Base::m_count; 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) { - 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] }; - return end(); + return Base::end(); } define_const_member_function(template __ia__identifier::const_iterator, cfind, IN CONST compare_type& v, IN size_type offset) { for(size_type i = offset; i < Base::m_count; i++) if(v == Base::m_data[i]) return { &Base::m_data[i] }; - return end(); + return Base::end(); } define_const_member_function(template __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] }; - return end(); + return Base::end(); } define_const_member_function(BOOL, contains, IN comparator_type v)