Browse Source

APVTS: Improve the performance of parameter lookups

tags/2021-05-28
Tom Poole 6 years ago
parent
commit
20d480535a
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h

+ 6
- 1
modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h View File

@@ -543,7 +543,12 @@ private:
const Identifier valueType { "PARAM" }, valuePropertyID { "value" }, idPropertyID { "id" };
std::map<String, std::unique_ptr<ParameterAdapter>> adapterTable;
struct StringRefLessThan final
{
bool operator() (StringRef a, StringRef b) const noexcept { return a.text.compare (b.text) < 0; }
};
std::map<StringRef, std::unique_ptr<ParameterAdapter>, StringRefLessThan> adapterTable;
CriticalSection valueTreeChanging;


Loading…
Cancel
Save