unnecessary type cast to same type
This commit is contained in:
parent
368facacc7
commit
0d8d1e8009
@ -178,7 +178,7 @@ fn add_obj(device:&wgpu::Device,modeldatas:& mut Vec<ModelData>,source:&[u8]){
|
|||||||
for &index in &[0, end_index - 1, end_index] {
|
for &index in &[0, end_index - 1, end_index] {
|
||||||
let vert = poly.0[index];
|
let vert = poly.0[index];
|
||||||
if let Some(&i)=vertex_index.get(&vert){
|
if let Some(&i)=vertex_index.get(&vert){
|
||||||
indices.push(i as u16);
|
indices.push(i);
|
||||||
}else{
|
}else{
|
||||||
let i=vertices.len() as u16;
|
let i=vertices.len() as u16;
|
||||||
vertices.push(Vertex {
|
vertices.push(Vertex {
|
||||||
@ -309,7 +309,7 @@ impl strafe_client::framework::Example for Skybox {
|
|||||||
let vert = face*4+index;
|
let vert = face*4+index;
|
||||||
let unique_id=(vert * 1<<0) + (index * 1<<8) + (face * 1<<16);
|
let unique_id=(vert * 1<<0) + (index * 1<<8) + (face * 1<<16);
|
||||||
if let Some(&i)=vertex_index.get(&unique_id){
|
if let Some(&i)=vertex_index.get(&unique_id){
|
||||||
indices.push(i as u16);
|
indices.push(i);
|
||||||
}else{
|
}else{
|
||||||
let i=vertices.len() as u16;
|
let i=vertices.len() as u16;
|
||||||
vertices.push(Vertex {
|
vertices.push(Vertex {
|
||||||
|
Loading…
Reference in New Issue
Block a user