jcornaz / heron

[DISCONTINUED] An ergonomic physics API for bevy games
MIT License
293 stars 44 forks source link

feat: make `CollisionLayers::none` and `CollisionLayers::from_bits` const functions #228

Closed Shatur closed 2 years ago

Shatur commented 2 years ago

Harmless change, I need this to make nicer tests for #224 :)

jcornaz commented 2 years ago

Do you need all of them? I would like to keep const methods to a minimum (because it is not possible to remove it later without breaking the API)

But I don't mind introducing const when driven by a need. I just want to make sure we mark const only what we need :-)

Shatur commented 2 years ago

Actually no, I only need from_bits. But I thought that simple methods, such as getters and comparsion could be const. Do you think I thould revert other functions? If yes, which one?

jcornaz commented 2 years ago

Ok, thanks. So you can keep const the two constructors (none and from_bits), and revert it for the other members.

Shatur commented 2 years ago

Okay, done!