зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #5443 - Use more usize (from Ms2ger:int); r=saneyuki
Source-Repo: https://github.com/servo/servo Source-Revision: a0a1304be08250511e20ed8b378bbf6a34c22bf4
This commit is contained in:
Родитель
f68ba10506
Коммит
1bc473080c
|
@ -122,7 +122,7 @@ impl<'a> PartialEq<ApplicableDeclarationsCacheEntry> for ApplicableDeclarationsC
|
|||
impl<'a> Hash for ApplicableDeclarationsCacheQuery<'a> {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
for declaration in self.declarations.iter() {
|
||||
let ptr: uint = unsafe {
|
||||
let ptr: usize = unsafe {
|
||||
mem::transmute_copy(declaration)
|
||||
};
|
||||
ptr.hash(state);
|
||||
|
@ -130,7 +130,7 @@ impl<'a> Hash for ApplicableDeclarationsCacheQuery<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
static APPLICABLE_DECLARATIONS_CACHE_SIZE: uint = 32;
|
||||
static APPLICABLE_DECLARATIONS_CACHE_SIZE: usize = 32;
|
||||
|
||||
pub struct ApplicableDeclarationsCache {
|
||||
cache: SimpleHashCache<ApplicableDeclarationsCacheEntry,Arc<ComputedValues>>,
|
||||
|
@ -331,7 +331,7 @@ impl StyleSharingCandidate {
|
|||
}
|
||||
}
|
||||
|
||||
static STYLE_SHARING_CANDIDATE_CACHE_SIZE: uint = 40;
|
||||
static STYLE_SHARING_CANDIDATE_CACHE_SIZE: usize = 40;
|
||||
|
||||
impl StyleSharingCandidateCache {
|
||||
pub fn new() -> StyleSharingCandidateCache {
|
||||
|
@ -351,7 +351,7 @@ impl StyleSharingCandidateCache {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn touch(&mut self, index: uint) {
|
||||
pub fn touch(&mut self, index: usize) {
|
||||
self.cache.touch(index)
|
||||
}
|
||||
}
|
||||
|
@ -363,7 +363,7 @@ pub enum StyleSharingResult {
|
|||
CannotShare(bool),
|
||||
/// The node's style can be shared. The integer specifies the index in the LRU cache that was
|
||||
/// hit and the damage that was done.
|
||||
StyleWasShared(uint, RestyleDamage),
|
||||
StyleWasShared(usize, RestyleDamage),
|
||||
}
|
||||
|
||||
pub trait MatchMethods {
|
||||
|
|
|
@ -153,7 +153,7 @@ impl Floats {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn len(&self) -> uint {
|
||||
pub fn len(&self) -> usize {
|
||||
self.list.floats.len()
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ impl FlowList {
|
|||
|
||||
/// O(1)
|
||||
#[inline]
|
||||
pub fn len(&self) -> uint {
|
||||
pub fn len(&self) -> usize {
|
||||
self.flows.len()
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ impl<'a> Iterator for FlowListIterator<'a> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn size_hint(&self) -> (uint, Option<uint>) {
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
self.it.size_hint()
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ impl<'a> Iterator for MutFlowListIterator<'a> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn size_hint(&self) -> (uint, Option<uint>) {
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
self.it.size_hint()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ fn static_assertion(node: UnsafeLayoutNode) {
|
|||
}
|
||||
|
||||
/// Vtable + pointer representation of a Flow trait object.
|
||||
pub type UnsafeFlow = (uint, uint);
|
||||
pub type UnsafeFlow = (usize, usize);
|
||||
|
||||
fn null_unsafe_flow() -> UnsafeFlow {
|
||||
(0, 0)
|
||||
|
|
Загрузка…
Ссылка в новой задаче