Convert mjElement to struct rather than opaque pointer.
By making mjElement the parent of mjCBase, mjCModel, and mjCDef, this CL enables safer casting using static_cast instead of reinterpret_cast and C-style casting. PiperOrigin-RevId: 619526291 Change-Id: Ifa2b4bd3ecd95bade61f41a7005c62212f456c00
This commit is contained in:
committed by
Copybara-Service
parent
e6bf6fc327
commit
dfe2b75378
@@ -33,7 +33,7 @@
|
||||
typedef std::map<std::string, int, std::less<> > mjKeyMap;
|
||||
typedef std::array<mjKeyMap, mjNOBJECT> mjListKeyMap;
|
||||
|
||||
class mjCModel_ {
|
||||
class mjCModel_ : public mjElement {
|
||||
public:
|
||||
// attach namespaces
|
||||
std::string prefix;
|
||||
|
||||
Reference in New Issue
Block a user