Decoder decode function should take a non-const pointer to mjResource.
This is because mjcReadResource requires a non-const pointer. PiperOrigin-RevId: 844737328 Change-Id: I88d217aa85a66023f6b222437403c136448cabfe
This commit is contained in:
committed by
Copybara-Service
parent
f0572c735a
commit
52ca07e210
@@ -69,7 +69,7 @@ typedef struct mjpResourceProvider mjpResourceProvider;
|
||||
|
||||
// function pointer types
|
||||
// return an mjSpec representing the decoded resource.
|
||||
typedef mjSpec* (*mjfDecode)(const mjResource* resource);
|
||||
typedef mjSpec* (*mjfDecode)(mjResource* resource);
|
||||
// return true if the given resource can be decoded.
|
||||
typedef int (*mjfCanDecode)(const mjResource* resource);
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ static mjSpec* MakeSimpleSpec() {
|
||||
}
|
||||
|
||||
// Always returns a simple mjSpec, ignoring the resource.
|
||||
mjSpec* FakeDecode(const mjResource* resource) { return MakeSimpleSpec(); }
|
||||
mjSpec* FakeDecode(mjResource* resource) { return MakeSimpleSpec(); }
|
||||
|
||||
// Can decode any resource that has a .fakeformat extension.
|
||||
int FakeCanDecode(const mjResource* resource) {
|
||||
|
||||
Reference in New Issue
Block a user