Use std::stable_sort in model compiler.

PiperOrigin-RevId: 538791034
Change-Id: I6c8eceffeb765a8a9801fee996d6ebf2964d8453
This commit is contained in:
Yuval Tassa
2023-06-08 08:20:35 -07:00
committed by Copybara-Service
parent 833d30858d
commit 188b04fba5
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -2619,8 +2619,8 @@ void mjCModel::TryCompile(mjModel*& m, mjData*& d, int vfs_provider) {
}
// sort pair, exclude in increasing signature order; reassign ids
sort(pairs.begin(), pairs.end(), comparePair);
sort(excludes.begin(), excludes.end(), compareBodyPair);
std::stable_sort(pairs.begin(), pairs.end(), comparePair);
std::stable_sort(excludes.begin(), excludes.end(), compareBodyPair);
reassignid(pairs);
reassignid(excludes);