From d1e189f1bf8ed296872235e73c51ab75251b2e8c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 5 Aug 2023 10:34:16 +1000 Subject: [PATCH] Try to fix clang build issues --- src/display_buffer.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/display_buffer.hh b/src/display_buffer.hh index a59ca99e..0fef5258 100644 --- a/src/display_buffer.hh +++ b/src/display_buffer.hh @@ -140,9 +140,9 @@ public: auto has_buffer_range = std::mem_fn(&DisplayAtom::has_buffer_range); 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.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); }