@@ -1000,8 +1000,8 @@ fn diffCleanupSemantic(allocator: std.mem.Allocator, diffs: *DiffList) DiffError
1000
1000
var overlap_length1 : usize = diffCommonOverlap (deletion , insertion );
1001
1001
var overlap_length2 : usize = diffCommonOverlap (insertion , deletion );
1002
1002
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 )
1005
1005
{
1006
1006
// Overlap found.
1007
1007
// Insert an equality and trim the surrounding edits.
@@ -1017,8 +1017,8 @@ fn diffCleanupSemantic(allocator: std.mem.Allocator, diffs: *DiffList) DiffError
1017
1017
pointer += 1 ;
1018
1018
}
1019
1019
} 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 )
1022
1022
{
1023
1023
// Reverse overlap found.
1024
1024
// Insert an equality and swap and trim the surrounding edits.
0 commit comments