From dd2597348183242d83c055e73ae22f7c60ff629f Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Wed, 17 Jul 2024 09:09:32 -0700 Subject: [PATCH] Remove unnecessary def_map copying. Introduced in 5b080bacc466c101a64a81452cddb18c79a6cc89 Made obsolete by 27b9ddda5bdd12345abdfbc0a6efce121d40cd6c [Context](https://github.com/google-deepmind/mujoco/commit/27b9ddda5bdd12345abdfbc0a6efce121d40cd6c#r144157607) PiperOrigin-RevId: 653254345 Change-Id: Ie944d2c3924d3eb91f7743c0d0c8413cd2cd79cc --- src/user/user_model.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/user/user_model.cc b/src/user/user_model.cc index 5f0631b8..4ada3658 100644 --- a/src/user/user_model.cc +++ b/src/user/user_model.cc @@ -136,12 +136,6 @@ mjCModel& mjCModel::operator=(const mjCModel& other) { // create new default tree mjCDef* subtree = new mjCDef(*other.defaults_[0]); *this += *subtree; - for (const auto& [name, def] : other.def_map) { - std::size_t index = - std::find(other.defaults_.begin(), other.defaults_.end(), def) - - other.defaults_.begin(); - def_map[name] = defaults_[index]; - } // copy name maps for (int i=0; i