Return stricter type from mjCModel::operator+=(mjDef&).

PiperOrigin-RevId: 772871198
Change-Id: I4c840389b38e2d8d6bcf92311fad3242324fa3af
This commit is contained in:
Nimrod Gileadi
2025-06-18 04:59:46 -07:00
committed by Copybara-Service
parent 6b309b5251
commit 9e2c21a17d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -653,7 +653,7 @@ mjCModel& mjCModel::operator-=(const mjCBody& subtree) {
// add default tree to this model
mjCModel_& mjCModel::operator+=(mjCDef& subtree) {
mjCModel& mjCModel::operator+=(mjCDef& subtree) {
defaults_.push_back(&subtree);
def_map[subtree.name] = &subtree;
subtree.model = this;
+1 -1
View File
@@ -187,7 +187,7 @@ class mjCModel : public mjCModel_, private mjSpec {
mjCModel& operator=(const mjCModel& other); // copy other into this, if they are not the same
mjCModel& operator+=(const mjCModel& other); // add other into this, even if they are the same
mjCModel& operator-=(const mjCBody& subtree); // remove subtree and all references from model
mjCModel_& operator+=(mjCDef& subtree); // add default tree to this model
mjCModel& operator+=(mjCDef& subtree); // add default tree to this model
mjCModel& operator-=(const mjCDef& subtree); // remove default tree from this model
mjSpec spec;