diff --git a/src/diff.hh b/src/diff.hh index 30a3884d..2f582b16 100644 --- a/src/diff.hh +++ b/src/diff.hh @@ -23,7 +23,7 @@ struct Snake template Snake find_end_snake_of_further_reaching_dpath(IteratorA a, int N, IteratorB b, int M, - const int* V, const int D, const int k, Equal eq) + const int* V, const int D, const int k, Equal&& eq) { const bool add = k == -D or (k != D and V[k-1] < V[k+1]); @@ -48,7 +48,7 @@ Snake find_end_snake_of_further_reaching_dpath(IteratorA a, int N, IteratorB b, template Snake find_middle_snake(IteratorA a, int N, IteratorB b, int M, - int* V1, int* V2, int cost_limit, Equal eq) + int* V1, int* V2, int cost_limit, Equal&& eq) { const int delta = N - M; V1[1] = 0; @@ -113,7 +113,7 @@ template> -void for_each_diff(IteratorA a, int N, IteratorB b, int M, OnDiff&& on_diff, Equal eq = Equal{}) +void for_each_diff(IteratorA a, int N, IteratorB b, int M, OnDiff&& on_diff, Equal&& eq = Equal{}) { const int max = 2 * (N + M) + 1; std::unique_ptr data(new int[2*max]);