mach: update to @min/@max (std.math.min/max is going away) (#774)
this commit is the beginning scope for resolving #771
This commit is contained in:
parent
edf34cf00d
commit
ef7b079149
2 changed files with 2 additions and 5 deletions
|
|
@ -1880,7 +1880,7 @@ pub fn peekToken(
|
|||
|
||||
pub fn advanceToken(p: *Parser) Ast.Index {
|
||||
const prev = p.tok_i;
|
||||
p.tok_i = std.math.min(prev +| 1, p.tokens.len);
|
||||
p.tok_i = @min(prev +| 1, p.tokens.len);
|
||||
return prev;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -311,10 +311,7 @@ pub const Player = struct {
|
|||
}
|
||||
|
||||
const stride = self.format.frameSize(self.channels.len);
|
||||
const n_frames = std.math.min(
|
||||
buf.*.requested,
|
||||
buf.*.buffer.*.datas[0].maxsize / stride,
|
||||
);
|
||||
const n_frames = @min(buf.*.requested, buf.*.buffer.*.datas[0].maxsize / stride);
|
||||
buf.*.buffer.*.datas[0].chunk.*.stride = stride;
|
||||
buf.*.buffer.*.datas[0].chunk.*.size = n_frames * stride;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue