mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
Stop using the deprecated range function.
This commit is contained in:
parent
c4b7979450
commit
4d41f1c991
17 changed files with 27 additions and 28 deletions
|
@ -154,7 +154,7 @@ fn read_input_device(device_path: &Path,
|
|||
let count = read / size_of::<linux_input_event>();
|
||||
let events: *mut linux_input_event = unsafe { transmute(buf.as_mut_ptr()) };
|
||||
let mut tracking_updated = false;
|
||||
for idx in range(0, count as int) {
|
||||
for idx in 0..(count as int) {
|
||||
let event: &linux_input_event = unsafe { transmute(events.offset(idx)) };
|
||||
match (event.evt_type, event.code) {
|
||||
(EV_SYN, EV_REPORT) => {
|
||||
|
|
|
@ -341,7 +341,7 @@ extern fn query(base: *const ANativeWindow,
|
|||
extern fn dequeueBuffer(base: *mut ANativeWindow, buf: *mut *mut ANativeWindowBuffer, fence: *mut c_int) -> c_int {
|
||||
unsafe {
|
||||
let window: &mut GonkNativeWindow = transmute(base);
|
||||
for idx in range(0, window.bufs.len()) {
|
||||
for idx in 0..window.bufs.len() {
|
||||
if idx == window.last_idx as uint {
|
||||
continue;
|
||||
}
|
||||
|
@ -363,7 +363,7 @@ extern fn dequeueBuffer(base: *mut ANativeWindow, buf: *mut *mut ANativeWindowBu
|
|||
extern fn queueBuffer(base: *mut ANativeWindow, buf: *mut ANativeWindowBuffer, fence: c_int) -> c_int {
|
||||
unsafe {
|
||||
let window: &mut GonkNativeWindow = transmute(base);
|
||||
for idx in range(0, window.bufs.len()) {
|
||||
for idx in 0..window.bufs.len() {
|
||||
match window.bufs[idx] {
|
||||
Some(_) => (),
|
||||
None => {
|
||||
|
@ -381,7 +381,7 @@ extern fn queueBuffer(base: *mut ANativeWindow, buf: *mut ANativeWindowBuffer, f
|
|||
extern fn cancelBuffer(base: *mut ANativeWindow, buf: *mut ANativeWindowBuffer, fence: c_int) -> c_int {
|
||||
unsafe {
|
||||
let window: &mut GonkNativeWindow = transmute(base);
|
||||
for idx in range(0, window.bufs.len()) {
|
||||
for idx in 0..window.bufs.len() {
|
||||
match window.bufs[idx] {
|
||||
Some(_) => (),
|
||||
None => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue