Add nodiscard to core math classes to catch c++ errors.
A common source of errors is to call functions (such as round()) expecting them to work in place, but them actually being designed only to return the processed value. Not using the return value in this case in indicative of a bug, and can be flagged as a warning by using the [[nodiscard]] attribute.
This commit is contained in:
parent
249c60e9d1
commit
b411a731fe
18 changed files with 35 additions and 23 deletions
|
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
class Variant;
|
||||
|
||||
class AABB {
|
||||
class _NO_DISCARD_ AABB {
|
||||
public:
|
||||
Vector3 position;
|
||||
Vector3 size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue