mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
Make preprocess function take comptime sized slice
This commit is contained in:
parent
a394a6300c
commit
997451da03
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user