@@ -1000,8 +1000,8 @@ fn diffCleanupSemantic(allocator: std.mem.Allocator, diffs: *DiffList) DiffError
10001000 var overlap_length1 : usize = diffCommonOverlap (deletion , insertion );
10011001 var overlap_length2 : usize = diffCommonOverlap (insertion , deletion );
10021002 if (overlap_length1 >= overlap_length2 ) {
1003- if (@intToFloat (f32 , overlap_length1 ) >= @intToFloat (f32 , deletion .len ) / 2.0 or
1004- @intToFloat (f32 , overlap_length1 ) >= @intToFloat (f32 , insertion .len ) / 2.0 )
1003+ if (@floatFromInt (f32 , overlap_length1 ) >= @floatFromInt (f32 , deletion .len ) / 2.0 or
1004+ @floatFromInt (f32 , overlap_length1 ) >= @floatFromInt (f32 , insertion .len ) / 2.0 )
10051005 {
10061006 // Overlap found.
10071007 // Insert an equality and trim the surrounding edits.
@@ -1017,8 +1017,8 @@ fn diffCleanupSemantic(allocator: std.mem.Allocator, diffs: *DiffList) DiffError
10171017 pointer += 1 ;
10181018 }
10191019 } else {
1020- if (@intToFloat (f32 , overlap_length2 ) >= @intToFloat (f32 , deletion .len ) / 2.0 or
1021- @intToFloat (f32 , overlap_length2 ) >= @intToFloat (f32 , insertion .len ) / 2.0 )
1020+ if (@floatFromInt (f32 , overlap_length2 ) >= @floatFromInt (f32 , deletion .len ) / 2.0 or
1021+ @floatFromInt (f32 , overlap_length2 ) >= @floatFromInt (f32 , insertion .len ) / 2.0 )
10221022 {
10231023 // Reverse overlap found.
10241024 // Insert an equality and swap and trim the surrounding edits.
0 commit comments