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:
@ -35,7 +35,7 @@
|
||||
|
||||
class Variant;
|
||||
|
||||
class Plane {
|
||||
class _NO_DISCARD_ Plane {
|
||||
public:
|
||||
Vector3 normal;
|
||||
real_t d = 0;
|
||||
|
||||
Reference in New Issue
Block a user