mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
run new zig fmt and remove stale comment
This commit is contained in:
parent
9f4d44bc49
commit
19964f5dc8
@ -38,12 +38,14 @@ pub extern fn __letf2(a: f128, b: f128) c_int {
|
|||||||
|
|
||||||
// If at least one of a and b is positive, we get the same result comparing
|
// If at least one of a and b is positive, we get the same result comparing
|
||||||
// a and b as signed integers as we would with a floating-point compare.
|
// a and b as signed integers as we would with a floating-point compare.
|
||||||
return if ((aInt & bInt) >= 0) if (aInt < bInt)
|
return if ((aInt & bInt) >= 0)
|
||||||
|
if (aInt < bInt)
|
||||||
LE_LESS
|
LE_LESS
|
||||||
else if (aInt == bInt)
|
else if (aInt == bInt)
|
||||||
LE_EQUAL
|
LE_EQUAL
|
||||||
else
|
else
|
||||||
LE_GREATER else
|
LE_GREATER
|
||||||
|
else
|
||||||
// Otherwise, both are negative, so we need to flip the sense of the
|
// Otherwise, both are negative, so we need to flip the sense of the
|
||||||
// comparison to get the correct result. (This assumes a twos- or ones-
|
// comparison to get the correct result. (This assumes a twos- or ones-
|
||||||
// complement integer representation; if integers are represented in a
|
// complement integer representation; if integers are represented in a
|
||||||
@ -73,7 +75,6 @@ pub extern fn __getf2(a: f128, b: f128) c_int {
|
|||||||
|
|
||||||
if (aAbs > infRep or bAbs > infRep) return GE_UNORDERED;
|
if (aAbs > infRep or bAbs > infRep) return GE_UNORDERED;
|
||||||
if ((aAbs | bAbs) == 0) return GE_EQUAL;
|
if ((aAbs | bAbs) == 0) return GE_EQUAL;
|
||||||
// zig fmt issue here, see https://github.com/ziglang/zig/issues/2661
|
|
||||||
return if ((aInt & bInt) >= 0)
|
return if ((aInt & bInt) >= 0)
|
||||||
if (aInt < bInt)
|
if (aInt < bInt)
|
||||||
GE_LESS
|
GE_LESS
|
||||||
|
|||||||
@ -276,7 +276,6 @@ fn renderTopLevelDecl(allocator: *mem.Allocator, stream: var, tree: *ast.Tree, i
|
|||||||
} else {
|
} else {
|
||||||
try renderExpression(allocator, stream, tree, indent, start_col, field.type_expr.?, Space.Comma); // type,
|
try renderExpression(allocator, stream, tree, indent, start_col, field.type_expr.?, Space.Comma); // type,
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (field.type_expr == null and field.value_expr != null) {
|
} else if (field.type_expr == null and field.value_expr != null) {
|
||||||
try renderToken(tree, stream, field.name_token, indent, start_col, Space.Space); // name
|
try renderToken(tree, stream, field.name_token, indent, start_col, Space.Space); // name
|
||||||
try renderToken(tree, stream, tree.nextToken(field.name_token), indent, start_col, Space.Space); // =
|
try renderToken(tree, stream, tree.nextToken(field.name_token), indent, start_col, Space.Space); // =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user