convert the last lossy casts to checked ones
This commit is contained in:
@@ -152,7 +152,9 @@ impl TonemapPipeline {
|
||||
-1.0, 3.0, 0.0, -1.0, // top-left (off-screen)
|
||||
];
|
||||
let vb_desc = D3D11_BUFFER_DESC {
|
||||
ByteWidth: size_of_val(&verts) as u32,
|
||||
// verts is a 12-float array, so the size is a compile-time constant
|
||||
// well inside u32.
|
||||
ByteWidth: u32::try_from(size_of_val(&verts)).unwrap_or(0),
|
||||
Usage: D3D11_USAGE_IMMUTABLE,
|
||||
BindFlags: D3D11_BIND_VERTEX_BUFFER.0 as u32,
|
||||
CPUAccessFlags: 0,
|
||||
|
||||
Reference in New Issue
Block a user