From 4a3b07782425374beee8c36ef524172d4d916c0e Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sun, 1 Nov 2015 23:11:55 +0100 Subject: [PATCH] Bugfix: find verb should check for ID match because otherwise we'd need to send a whole subtree over the wire and then descend into it just to find an element. This too is a ripple effect of making '==' deep --- src/lib/diff/tree-diff-application.hpp | 7 ++++++- wiki/thinkPad.ichthyo.mm | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/diff/tree-diff-application.hpp b/src/lib/diff/tree-diff-application.hpp index 055ac813e..a9ea44dcb 100644 --- a/src/lib/diff/tree-diff-application.hpp +++ b/src/lib/diff/tree-diff-application.hpp @@ -233,7 +233,12 @@ namespace diff{ { Iter end_of_scope = src().currIsAttrib()? src().attribs.end() : src().children.end(); - return std::find (srcPos(), end_of_scope, elm); + return std::find_if (srcPos() + ,end_of_scope + ,[&](auto& entry) + { + return entry.matches(elm); + }); } GenNode const& diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 56a1bbdce..111db1b0f 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -2008,9 +2008,6 @@ - - -