Modernize `std::min_element` with ranges
This commit is contained in:
parent
c99a0c25e0
commit
e572081ac3
|
@ -846,7 +846,7 @@ void AssemblerWidget::CloseTab(int index, AsmEditor* editor)
|
|||
|
||||
int AssemblerWidget::AllocateTabNum()
|
||||
{
|
||||
auto min_it = std::min_element(m_free_editor_nums.begin(), m_free_editor_nums.end());
|
||||
auto min_it = std::ranges::min_element(m_free_editor_nums);
|
||||
if (min_it == m_free_editor_nums.end())
|
||||
{
|
||||
return m_unnamed_editor_count++;
|
||||
|
|
Loading…
Reference in New Issue