diff options
| author | antlilja <liljaanton2001@gmail.com> | 2023-07-17 00:21:45 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-09-27 11:24:28 -0700 |
| commit | bcf4a1391331e52e4a06528530316970ded75c74 (patch) | |
| tree | 484d6472f552780d6482b8457e56b29f9a06379d /lib/std/Build/Step/ConfigHeader.zig | |
| parent | 1c02e58fc06aa3e429f963e600e126611df3626e (diff) | |
| download | zig-bcf4a1391331e52e4a06528530316970ded75c74.tar.gz zig-bcf4a1391331e52e4a06528530316970ded75c74.zip | |
Remove `@fabs`, fabs and absCast/Int from std lib
Replaces occurences of @fabs absCast and absInt with new @abs builtin.
Also removes the std.math.fabs alias from math.zig.
Diffstat (limited to 'lib/std/Build/Step/ConfigHeader.zig')
| -rw-r--r-- | lib/std/Build/Step/ConfigHeader.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/Build/Step/ConfigHeader.zig b/lib/std/Build/Step/ConfigHeader.zig index 35e92ee04e..95386f45f0 100644 --- a/lib/std/Build/Step/ConfigHeader.zig +++ b/lib/std/Build/Step/ConfigHeader.zig @@ -539,7 +539,7 @@ fn replace_variables( .int => |i| { const buf = try std.fmt.allocPrint(allocator, "{s}{}{s}", .{ beginline, i, endline }); const isNegative = i < 0; - const digits = (if (0 < i) std.math.log10(std.math.absCast(i)) else 0) + 1; + const digits = (if (0 < i) std.math.log10(@abs(i)) else 0) + 1; last_index = start_index + @intFromBool(isNegative) + digits + 1; allocator.free(content_buf); |
