Change mj_encode return type to 64-bit (mjtSize)
This supports encoding files larger than 2GB. PiperOrigin-RevId: 939828697 Change-Id: If60d36c61475ced20b4eb58408ffb37e25bf3db7
This commit is contained in:
committed by
Copybara-Service
parent
1e04c568e8
commit
d83ef0b6b9
@@ -306,8 +306,8 @@ std::unordered_map<std::string, AssetEntry> CollectAssets(
|
||||
return archive_entries;
|
||||
}
|
||||
|
||||
int MjzEncode(const mjSpec* spec, const mjModel* model, const mjVFS* vfs,
|
||||
mjResource* resource) {
|
||||
mjtSize MjzEncode(const mjSpec* spec, const mjModel* model, const mjVFS* vfs,
|
||||
mjResource* resource) {
|
||||
if (!spec || !resource) {
|
||||
return -1;
|
||||
}
|
||||
@@ -399,7 +399,7 @@ int MjzEncode(const mjSpec* spec, const mjModel* model, const mjVFS* vfs,
|
||||
|
||||
resource->data = archive_buf;
|
||||
|
||||
return static_cast<int>(archive_size);
|
||||
return static_cast<mjtSize>(archive_size);
|
||||
}
|
||||
|
||||
void MjzCloseResource(mjResource* resource) {
|
||||
|
||||
Reference in New Issue
Block a user