novelrt / NovelRT

A cross-platform 2D game engine accompanied by a strong toolset for visual novels.
MIT License
183 stars 43 forks source link

`NovelRT::Maths` is incorrectly presenting functions as not `[[nodiscard]]` when they, in fact, are. #529

Closed RubyNova closed 1 year ago

RubyNova commented 1 year ago

Note: for support questions, please use the #engine-user-help channel in our Discord or create a discussion. This repository's issues are reserved for feature requests and bug reports.

Describe the issue: A clear and concise description of what the the current behaviour is. Methods within the NovelRT::Maths namespace that are purely designed to return a value are not marked as [[nodiscard]], and are not documented as behaving in this way. This means people using the API might have unused calls laying around, causing wasted processing time.

Please provide the steps to reproduce if possible:

  1. Clone the repo
  2. Switch to the main branch
  3. Open a sample app and call one of the offending methods without assigning the result to anything
  4. Observe the issue

Expected behaviour: the [[nodiscard]] attribute should be correctly used, and documented within the doxygen comment.

Please tell us about your environment:
N/A

Additional context: N/A

Pheubel commented 1 year ago

As i've already had my feet wet in the maths namespace of NovelRT, i think i can easily help out with this

RubyNova commented 1 year ago

Assigned. Have fun!