bevy_ecs_tilemap icon indicating copy to clipboard operation
bevy_ecs_tilemap copied to clipboard

TilePos and relatives should use usize, not u32

Open alice-i-cecile opened this issue 4 years ago • 1 comments

This is an important perf and usability optimization when interfacing with external arrays (which are always indexed by usize slices).

Currently, you must repeatedly waste operations performing this conversion and littering the code base with as usize.

alice-i-cecile avatar Sep 09 '21 01:09 alice-i-cecile

FYI there is no perf cost; integer type conversions compile to no-ops, there are no extra operations. There is no such thing as integer type conversion at the assembly / machine code level.

This is just to make Rust code prettier and more correct.

inodentry avatar Apr 11 '22 09:04 inodentry

I think this is no longer relevant, but feel free to reopen if I am wrong.

StarArawn avatar Aug 11 '22 16:08 StarArawn