syoyo / tinygltf

Header only C++11 tiny glTF 2.0 library
MIT License
2.01k stars 409 forks source link

Question about the (internal) parser signature #428

Closed agnat closed 1 year ago

agnat commented 1 year ago

Hi @syoyo,

after working with the code for a bit I have a question regarding the internals. While the serialiser uses a const and a non-const reference for in- and output, the parser uses a pointer. This seems a bit odd. What was the intended purpose here?

I'm asking because only the low-level functions perform a nullptr check and the high-level functions don't. I'm thinking about replacing the pointer with a writable reference, because that's much safer, obviously. What do you think?

Best...

syoyo commented 1 year ago

You should describe your question in detail, following https://github.com/syoyo/tinygltf/issues/291