Check for duplicated names when setting element names.
PiperOrigin-RevId: 778827590 Change-Id: I77a208c1571cf735cae80840ea830aa347681f71
This commit is contained in:
committed by
Copybara-Service
parent
594e17074a
commit
564c51ddb9
@@ -323,6 +323,9 @@ class mjCModel : public mjCModel_, private mjSpec {
|
||||
// set attached flag
|
||||
void SetAttached(bool deepcopy) { attached_ |= !deepcopy; }
|
||||
|
||||
// check for repeated names in list
|
||||
void CheckRepeat(mjtObj type);
|
||||
|
||||
private:
|
||||
// settings for each defaults class
|
||||
std::vector<mjCDef*> defaults_;
|
||||
@@ -411,6 +414,10 @@ class mjCModel : public mjCModel_, private mjSpec {
|
||||
// populate objects ids
|
||||
void ProcessLists(bool checkrepeat = true);
|
||||
|
||||
// process list of objects
|
||||
template <class T> void ProcessList_(mjListKeyMap& ids, std::vector<T*>& list,
|
||||
mjtObj type, bool checkrepeat = true);
|
||||
|
||||
// reset lists of kinematic tree
|
||||
void ResetTreeLists();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user