mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Store context menu items in unordered maps
The difference in performance won't be noticable, but both lookups and modifications in these things are much faster once you have more than one or two elements.
This commit is contained in:
@@ -357,7 +357,7 @@ class Vst3PluginProxyImpl : public Vst3PluginProxy {
|
||||
* lot of details o how this should be implemented and there's no
|
||||
* example implementation around.
|
||||
*/
|
||||
std::map<int32, Steinberg::IPtr<YaContextMenuTarget>> targets;
|
||||
std::unordered_map<int32, Steinberg::IPtr<YaContextMenuTarget>> targets;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -55,7 +55,8 @@ class Vst3ContextMenuProxyImpl : public Vst3ContextMenuProxy {
|
||||
* The targets passed when to `addItem` calls made by the plugin. This way
|
||||
* we can call these same targets later. The key here is the item's tag.
|
||||
*/
|
||||
std::map<int32, Steinberg::IPtr<Steinberg::Vst::IContextMenuTarget>>
|
||||
std::unordered_map<int32,
|
||||
Steinberg::IPtr<Steinberg::Vst::IContextMenuTarget>>
|
||||
context_menu_targets;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user