mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-10 21:47:41 +00:00
CAiFuncMap: Avoid redundant map lookups in getters
We can just use the result of the find operation instead of rehashing into the map to retrieve the entry. This also allows us to make the getter const qualified.
This commit is contained in:
@@ -18,7 +18,7 @@ class CAiFuncMap {
|
||||
|
||||
public:
|
||||
CAiFuncMap();
|
||||
CAiStateFunc GetStateFunc(const char*);
|
||||
CAiTriggerFunc GetTriggerFunc(const char*);
|
||||
CAiStateFunc GetStateFunc(const char*) const;
|
||||
CAiTriggerFunc GetTriggerFunc(const char*) const;
|
||||
};
|
||||
} // namespace urde
|
||||
|
||||
Reference in New Issue
Block a user