Remove uint::max/min in favor if math::max/min

This commit is contained in:
Matt Brubeck 2011-10-27 13:04:06 -07:00 committed by Brian Anderson
parent 50d99ec32c
commit 5d6fe1a533
4 changed files with 7 additions and 9 deletions

View file

@ -3,6 +3,7 @@ import std::fs;
import std::os_fs;
import std::vec;
import std::map;
import std::math;
import std::str;
import std::uint;
import metadata::cstore;
@ -128,7 +129,7 @@ fn get_relative_to(abs1: fs::path, abs2: fs::path) -> fs::path {
assert len1 > 0u;
assert len2 > 0u;
let max_common_path = uint::min(len1, len2) - 1u;
let max_common_path = math::min(len1, len2) - 1u;
let start_idx = 0u;
while start_idx < max_common_path
&& split1[start_idx] == split2[start_idx] {

View file

@ -6,6 +6,7 @@ import std::box;
import std::ufind;
import std::map;
import std::map::hashmap;
import std::math;
import std::option;
import std::option::none;
import std::option::some;
@ -1812,7 +1813,7 @@ mod unify {
// Unifies two sets.
fn union(cx: @ctxt, set_a: uint, set_b: uint,
variance: variance) -> union_result {
ufind::grow(cx.vb.sets, uint::max(set_a, set_b) + 1u);
ufind::grow(cx.vb.sets, math::max(set_a, set_b) + 1u);
let root_a = ufind::find(cx.vb.sets, set_a);
let root_b = ufind::find(cx.vb.sets, set_b);