g-truc / glm

OpenGL Mathematics (GLM)
https://glm.g-truc.net
Other
9.1k stars 2.12k forks source link

No unused function result warning #1217

Closed ghost closed 7 months ago

ghost commented 8 months ago

I'm using glm::rotate, and if I forget to use the function result somewhere in my code, the error is silent, the results will be wrong,

marking glm::rotate as [[nodiscard]] fixes it, but that needs to be done for all similar functions

christophe-lunarg commented 7 months ago

I like this feature request, I'll try to implement it someday soon (TM)!

ghost commented 7 months ago

That was quick, thanks a ton for awesome work ☺️☺️🤍

christophe-lunarg commented 7 months ago

That was quick, thanks a ton for awesome work ☺️☺️🤍

It's probably not exaustive but future contributions would be welcome!