Try to fix clang build issues

This commit is contained in:
Maxime Coste 2023-08-05 10:34:16 +10:00
parent 521549fb69
commit d1e189f1bf

View File

@ -140,9 +140,9 @@ public:
auto has_buffer_range = std::mem_fn(&DisplayAtom::has_buffer_range); auto has_buffer_range = std::mem_fn(&DisplayAtom::has_buffer_range);
if (auto first = std::find_if(beg, end, has_buffer_range); first != end) if (auto first = std::find_if(beg, end, has_buffer_range); first != end)
{ {
auto last = std::find_if(std::reverse_iterator(end), std::reverse_iterator(first), has_buffer_range); auto& last = *std::find_if(std::reverse_iterator(end), std::reverse_iterator(first), has_buffer_range);
m_range.begin = std::min(m_range.begin, first->begin()); m_range.begin = std::min(m_range.begin, first->begin());
m_range.end = std::max(m_range.end, last->end()); m_range.end = std::max(m_range.end, last.end());
} }
return m_atoms.insert(pos, beg, end); return m_atoms.insert(pos, beg, end);
} }