Change not required, issue was addressed in e48da1e38c

PiperOrigin-RevId: 861680910
Change-Id: Iea5c7190bf826c9254eb1bd2f78b0098073cba20
This commit is contained in:
Yuval Tassa
2026-01-27 06:02:25 -08:00
committed by Copybara-Service
parent e787f8717d
commit dce2ed00ea
+4 -4
View File
@@ -2219,13 +2219,13 @@ void mjCModel::SetSizes() {
// nhfielddata // nhfielddata
for (int i=0; i < nhfield; i++) { for (int i=0; i < nhfield; i++) {
nhfielddata += static_cast<size_t>(hfields_[i]->nrow) * hfields_[i]->ncol; nhfielddata += static_cast<mjtSize>(hfields_[i]->nrow) * hfields_[i]->ncol;
} }
// ntexdata // ntexdata
for (int i=0; i < ntex; i++) { for (int i=0; i < ntex; i++) {
const mjCTexture* tex = textures_[i]; const mjCTexture* tex = textures_[i];
ntexdata += static_cast<size_t>(tex->nchannel) * tex->width * tex->height; ntexdata += static_cast<mjtSize>(tex->nchannel) * tex->width * tex->height;
} }
// nwrap // nwrap
@@ -3579,7 +3579,7 @@ void mjCModel::CopyObjects(mjModel* m) {
// copy elevation data // copy elevation data
memcpy(m->hfield_data + data_adr, phf->data.data(), memcpy(m->hfield_data + data_adr, phf->data.data(),
static_cast<size_t>(phf->nrow) * phf->ncol * sizeof(float)); static_cast<mjtSize>(phf->nrow) * phf->ncol * sizeof(float));
// advance counter // advance counter
data_adr += phf->nrow*phf->ncol; data_adr += phf->nrow*phf->ncol;
@@ -3600,7 +3600,7 @@ void mjCModel::CopyObjects(mjModel* m) {
m->tex_adr[i] = data_adr; m->tex_adr[i] = data_adr;
// copy rgb data // copy rgb data
size_t nbytes = static_cast<size_t>(ptex->nchannel) * ptex->width * ptex->height; mjtSize nbytes = static_cast<mjtSize>(ptex->nchannel) * ptex->width * ptex->height;
memcpy(m->tex_data + data_adr, ptex->data_.data(), nbytes); memcpy(m->tex_data + data_adr, ptex->data_.data(), nbytes);
// advance counter // advance counter