FIX: return self pos (= *i )
This commit is contained in:
parent
f93c71ed80
commit
835b3ce145
@ -841,8 +841,11 @@ namespace nana
|
|||||||
if (pos >= catobj.sorted.size())
|
if (pos >= catobj.sorted.size())
|
||||||
throw std::out_of_range("listbox: Invalid item position.");
|
throw std::out_of_range("listbox: Invalid item position.");
|
||||||
|
|
||||||
auto i = std::find(catobj.sorted.begin(), catobj.sorted.end(), pos);
|
for (size_type i=0; i<catobj.sorted.size();++i)
|
||||||
return (i != catobj.sorted.end() ? *i : npos);
|
if (pos==catobj.sorted[i])
|
||||||
|
return i;
|
||||||
|
|
||||||
|
return npos ;
|
||||||
}
|
}
|
||||||
|
|
||||||
category_t::container::value_type& at(const index_pair& pos)
|
category_t::container::value_type& at(const index_pair& pos)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user