@@ -707,11 +707,15 @@ struct moved_entry {
707
707
struct moved_entry * next_line ;
708
708
};
709
709
710
- static int moved_entry_cmp (const struct diff_options * diffopt ,
711
- const struct moved_entry * a ,
712
- const struct moved_entry * b ,
710
+ static int moved_entry_cmp (const void * hashmap_cmp_fn_data ,
711
+ const void * entry ,
712
+ const void * entry_or_key ,
713
713
const void * keydata )
714
714
{
715
+ const struct diff_options * diffopt = hashmap_cmp_fn_data ;
716
+ const struct moved_entry * a = entry ;
717
+ const struct moved_entry * b = entry_or_key ;
718
+
715
719
return !xdiff_compare_lines (a -> es -> line , a -> es -> len ,
716
720
b -> es -> line , b -> es -> len ,
717
721
diffopt -> xdl_opts );
@@ -5534,10 +5538,8 @@ static void diff_flush_patch_all_file_pairs(struct diff_options *o)
5534
5538
if (o -> color_moved ) {
5535
5539
struct hashmap add_lines , del_lines ;
5536
5540
5537
- hashmap_init (& del_lines ,
5538
- (hashmap_cmp_fn )moved_entry_cmp , o , 0 );
5539
- hashmap_init (& add_lines ,
5540
- (hashmap_cmp_fn )moved_entry_cmp , o , 0 );
5541
+ hashmap_init (& del_lines , moved_entry_cmp , o , 0 );
5542
+ hashmap_init (& add_lines , moved_entry_cmp , o , 0 );
5541
5543
5542
5544
add_lines_to_move_detection (o , & add_lines , & del_lines );
5543
5545
mark_color_as_moved (o , & add_lines , & del_lines );
0 commit comments