Browse Source

Use builtin.min and builtin.max in package slice

gingerBill 4 years ago
parent
commit
6afc28f827
1 changed files with 2 additions and 2 deletions
  1. 2 2
      core/slice/slice.odin

+ 2 - 2
core/slice/slice.odin

@@ -299,7 +299,7 @@ min :: proc(s: $S/[]$T) -> (res: T, ok: bool) where intrinsics.type_is_ordered(T
 		res = s[0];
 		ok = true;
 		for v in s[1:] {
-			res = min(res, v);
+			res = builtin.min(res, v);
 		}
 	}
 	return;
@@ -309,7 +309,7 @@ max :: proc(s: $S/[]$T) -> (res: T, ok: bool) where intrinsics.type_is_ordered(T
 		res = s[0];
 		ok = true;
 		for v in s[1:] {
-			res = max(res, v);
+			res = builtin.max(res, v);
 		}
 	}
 	return;