aboutsummaryrefslogtreecommitdiff
path: root/lib/std/sort/block.zig
diff options
context:
space:
mode:
authorr00ster91 <r00ster91@proton.me>2023-06-02 22:02:45 -0400
committerAndrew Kelley <andrew@ziglang.org>2023-06-16 13:44:09 -0700
commit259315606827620daaabf82b479e59ee710097cd (patch)
tree16c797e4cc15479a27e64b4414517d9334f52250 /lib/std/sort/block.zig
parent22c6b6c9a9378aaca75c83c2182a6d94298f6bc2 (diff)
downloadzig-259315606827620daaabf82b479e59ee710097cd.tar.gz
zig-259315606827620daaabf82b479e59ee710097cd.zip
migration: std.math.{min, min3, max, max3} -> `@min` & `@max`
Diffstat (limited to 'lib/std/sort/block.zig')
-rw-r--r--lib/std/sort/block.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/std/sort/block.zig b/lib/std/sort/block.zig
index 6c1be9c6c2..518d148a73 100644
--- a/lib/std/sort/block.zig
+++ b/lib/std/sort/block.zig
@@ -590,7 +590,7 @@ pub fn block(
// whenever we leave an A block behind, we'll need to merge the previous A block with any B blocks that follow it, so track that information as well
var lastA = firstA;
var lastB = Range.init(0, 0);
- var blockB = Range.init(B.start, B.start + math.min(block_size, B.length()));
+ var blockB = Range.init(B.start, B.start + @min(block_size, B.length()));
blockA.start += firstA.length();
indexA = buffer1.start;
@@ -849,7 +849,7 @@ fn findFirstForward(
comptime lessThan: fn (@TypeOf(context), lhs: T, rhs: T) bool,
) usize {
if (range.length() == 0) return range.start;
- const skip = math.max(range.length() / unique, @as(usize, 1));
+ const skip = @max(range.length() / unique, @as(usize, 1));
var index = range.start + skip;
while (lessThan(context, items[index - 1], value)) : (index += skip) {
@@ -871,7 +871,7 @@ fn findFirstBackward(
comptime lessThan: fn (@TypeOf(context), lhs: T, rhs: T) bool,
) usize {
if (range.length() == 0) return range.start;
- const skip = math.max(range.length() / unique, @as(usize, 1));
+ const skip = @max(range.length() / unique, @as(usize, 1));
var index = range.end - skip;
while (index > range.start and !lessThan(context, items[index - 1], value)) : (index -= skip) {
@@ -893,7 +893,7 @@ fn findLastForward(
comptime lessThan: fn (@TypeOf(context), lhs: T, rhs: T) bool,
) usize {
if (range.length() == 0) return range.start;
- const skip = math.max(range.length() / unique, @as(usize, 1));
+ const skip = @max(range.length() / unique, @as(usize, 1));
var index = range.start + skip;
while (!lessThan(context, value, items[index - 1])) : (index += skip) {
@@ -915,7 +915,7 @@ fn findLastBackward(
comptime lessThan: fn (@TypeOf(context), lhs: T, rhs: T) bool,
) usize {
if (range.length() == 0) return range.start;
- const skip = math.max(range.length() / unique, @as(usize, 1));
+ const skip = @max(range.length() / unique, @as(usize, 1));
var index = range.end - skip;
while (index > range.start and lessThan(context, value, items[index - 1])) : (index -= skip) {