Move the map lookup outside of the mesh processing loop. Change to unordered_map.
PiperOrigin-RevId: 651745837 Change-Id: Ibfcbe4b8cefa53a3dbaa99c4ca68442e2e10bc5d
This commit is contained in:
committed by
Copybara-Service
parent
6e64dd10e8
commit
84108589c4
@@ -20,6 +20,7 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@@ -276,7 +277,7 @@ class mjCModel : public mjCModel_, private mjSpec {
|
||||
void RestoreState(const mjModel* m, mjData** dest);
|
||||
|
||||
// map from default class name to default class pointer
|
||||
std::map<std::string, mjCDef*> def_map;
|
||||
std::unordered_map<std::string, mjCDef*> def_map;
|
||||
|
||||
private:
|
||||
// settings for each defaults class
|
||||
|
||||
Reference in New Issue
Block a user