diff options
| author | dec05eba <dec05eba@protonmail.com> | 2020-09-05 14:25:44 +0200 |
|---|---|---|
| committer | dec05eba <dec05eba@protonmail.com> | 2020-09-05 14:25:44 +0200 |
| commit | 997451da03f25de310fc9f19393b19fbb5ac0062 (patch) | |
| tree | a39a04579727959d2280881174b7b7a86fd8c864 /lib/std | |
| parent | a394a6300cb79ced98d445917c8c73937107e4d1 (diff) | |
| download | zig-997451da03f25de310fc9f19393b19fbb5ac0062.tar.gz zig-997451da03f25de310fc9f19393b19fbb5ac0062.zip | |
Make preprocess function take comptime sized slice
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/mem.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/mem.zig b/lib/std/mem.zig index dc06ed8b61..5833bf9670 100644 --- a/lib/std/mem.zig +++ b/lib/std/mem.zig @@ -870,7 +870,7 @@ fn indexOfPosLinear(comptime T: type, haystack: []const T, start_index: usize, n return null; } -fn boyerMooreHorspoolPreprocessReverse(pattern: []const u8, table: []usize) void { +fn boyerMooreHorspoolPreprocessReverse(pattern: []const u8, table: *[256]usize) void { for (table) |*c| { c.* = pattern.len; } @@ -881,7 +881,7 @@ fn boyerMooreHorspoolPreprocessReverse(pattern: []const u8, table: []usize) void } } -fn boyerMooreHorspoolPreprocess(pattern: []const u8, table: []usize) void { +fn boyerMooreHorspoolPreprocess(pattern: []const u8, table: *[256]usize) void { for (table) |*c| { c.* = pattern.len; } |
