Replace deprecated calls

std.math.min,
std.math.max,
std.math.inf_f32
Were removed from the standard library and no longer compile.
This commit is contained in:
FalsePattern 2023-06-17 16:32:09 +02:00
parent 83c9a7b493
commit 4b35e80f96
No known key found for this signature in database
GPG Key ID: FDF7126A9E124447
2 changed files with 3 additions and 3 deletions

View File

@ -3023,8 +3023,8 @@ test "float value" {
const f32_nan_value = try ip.get(gpa, .{ .float_32_value = std.math.nan_f32 });
const f32_qnan_value = try ip.get(gpa, .{ .float_32_value = std.math.qnan_f32 });
const f32_inf_value = try ip.get(gpa, .{ .float_32_value = std.math.inf_f32 });
const f32_ninf_value = try ip.get(gpa, .{ .float_32_value = -std.math.inf_f32 });
const f32_inf_value = try ip.get(gpa, .{ .float_32_value = std.math.inf(f32) });
const f32_ninf_value = try ip.get(gpa, .{ .float_32_value = -std.math.inf(f32) });
const f32_zero_value = try ip.get(gpa, .{ .float_32_value = 0.0 });
const f32_nzero_value = try ip.get(gpa, .{ .float_32_value = -0.0 });

View File

@ -792,7 +792,7 @@ fn resolveTypeOfNodeUncached(analyser: *Analyser, node_handle: NodeWithHandle) e
}
// Bind type params to the arguments passed in the call.
const param_len = std.math.min(call.ast.params.len, expected_params);
const param_len = @min(call.ast.params.len, expected_params);
var i: usize = 0;
while (ast.nextFnParam(&it)) |decl_param| : (i += 1) {
if (i >= param_len) break;