Closed appgurueu closed 4 months ago
Wondering why you didn't just make it a std::string
? or is ""
somehow reserved?
Wondering why you didn't just make it a
std::string
? or is""
somehow reserved?
Two reasons:
std::optional
forces me to handle the "absence" case everywhere. It makes it explicit when a name is absent, forcing me to handle that correctly, whereas "empty name means absence" is just a convention that's easy to (accidentally) violate.
Achieved by refactoring the code to use
std::optional<std::string>
instead ofcore::stringc
.Soft prerequisite for gltf support: gltf does not require bones to be named. We want to support models with "unnamed" bones.
Corresponding Minetest changes: https://github.com/minetest/minetest/pull/14330
How to test
![cool guy :] haha](https://github.com/minetest/irrlicht/assets/34514239/3049e2a6-3f61-49a3-9db4-201e27777d79)