Add compiler C API for mjmSite.

PiperOrigin-RevId: 604573450
Change-Id: I6ba7fcece0942ddc0d109413ba5684b2df3fab96
This commit is contained in:
Alessio Quaglino
2024-02-06 01:50:01 -08:00
committed by Copybara-Service
parent f763254a00
commit 3b2dd06c54
13 changed files with 342 additions and 73 deletions
+3 -3
View File
@@ -1034,7 +1034,7 @@ template void mjXUtil::WriteAttr(XMLElement* elem, string name, int n,
// write vector<double> attribute, default = zero array
void mjXUtil::WriteVector(XMLElement* elem, string name, vector<double>& vec) {
void mjXUtil::WriteVector(XMLElement* elem, string name, const vector<double>& vec) {
// proceed only if non-zero found
bool ok = false;
for (size_t i=0; i<vec.size(); i++) {
@@ -1053,8 +1053,8 @@ void mjXUtil::WriteVector(XMLElement* elem, string name, vector<double>& vec) {
// write vector<double> attribute, default with same size
void mjXUtil::WriteVector(XMLElement* elem, string name, vector<double>& vec,
vector<double>& def) {
void mjXUtil::WriteVector(XMLElement* elem, string name, const vector<double>& vec,
const vector<double>& def) {
// proceed only if non-zero found
bool ok = false;
for (size_t i=0; i<vec.size(); i++) {