diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-11-06 23:25:57 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-11-08 15:57:24 -0500 |
| commit | e0db54e89d6f4e9f56800ddb1017e30be1b7d58a (patch) | |
| tree | 5a5a88dcebf349bf92da9ba2be9e8de63dc3ab81 /lib/std/math/big | |
| parent | 2a6fbbd8fba30b8d24aa966606372f595c102d55 (diff) | |
| download | zig-e0db54e89d6f4e9f56800ddb1017e30be1b7d58a.tar.gz zig-e0db54e89d6f4e9f56800ddb1017e30be1b7d58a.zip | |
update the codebase to use `@as`
Diffstat (limited to 'lib/std/math/big')
| -rw-r--r-- | lib/std/math/big/int.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/math/big/int.zig b/lib/std/math/big/int.zig index bfdc768375..fa2424de07 100644 --- a/lib/std/math/big/int.zig +++ b/lib/std/math/big/int.zig @@ -261,7 +261,7 @@ pub const Int = struct { /// the minus sign. This is used for determining the number of characters needed to print the /// value. It is inexact and may exceed the given value by ~1-2 bytes. pub fn sizeInBase(self: Int, base: usize) usize { - const bit_count = usize(@boolToInt(!self.isPositive())) + self.bitCountAbs(); + const bit_count = @as(usize, @boolToInt(!self.isPositive())) + self.bitCountAbs(); return (bit_count / math.log2(base)) + 1; } |
