summaryrefslogtreecommitdiff
path: root/src/display_buffer.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/display_buffer.hh')
-rw-r--r--src/display_buffer.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/display_buffer.hh b/src/display_buffer.hh
index c4ea6fb5..3a6ad0c2 100644
--- a/src/display_buffer.hh
+++ b/src/display_buffer.hh
@@ -7,7 +7,8 @@
#include "string.hh"
#include "vector.hh"
#include "hash_map.hh"
-#include <functional>
+
+#include <algorithm>
namespace Kakoune
{
@@ -137,7 +138,7 @@ public:
template<typename It>
iterator insert(iterator pos, It beg, It end)
{
- auto has_buffer_range = std::mem_fn(&DisplayAtom::has_buffer_range);
+ auto has_buffer_range = [](const DisplayAtom& atom) { return atom.has_buffer_range(); };
auto had_range = any_of(*this, has_buffer_range);
if (auto first = std::find_if(beg, end, has_buffer_range); first != end)
{