Mark mjCError and mjXError as [[nodiscard]].
This lets the compiler catch the mistake of creating an exception without throwing it. PiperOrigin-RevId: 474536776 Change-Id: I5bd18258ce6ddd266adb1c852b1ba9e3063cd0b2
This commit is contained in:
committed by
Copybara-Service
parent
0a0acb3419
commit
c8517e63a4
@@ -84,7 +84,7 @@ typedef enum _mjtMeshType {
|
||||
|
||||
|
||||
// error information
|
||||
class mjCError {
|
||||
class [[nodiscard]] mjCError {
|
||||
public:
|
||||
mjCError(const mjCBase* obj = 0,
|
||||
const char* msg = 0,
|
||||
|
||||
Reference in New Issue
Block a user