Merge pull request #13090 from mitaclaw/ranges-modernization-1-trivial

Ranges Algorithms Modernization - Trivial
This commit is contained in:
JosJuice
2024-10-15 17:08:55 +02:00
committed by GitHub
52 changed files with 106 additions and 118 deletions

View File

@ -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++;

View File

@ -481,7 +481,7 @@ void WatchWidget::DeleteSelectedWatches()
}
// Sort greatest to smallest, so we don't stomp on existing indices
std::sort(row_indices.begin(), row_indices.end(), std::greater{});
std::ranges::sort(row_indices, std::ranges::greater{});
for (const int row : row_indices)
{
DeleteWatch(guard, row);