1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-17 00:44:19 +00:00

APVTS: Improve the performance of parameter lookups

This commit is contained in:
Tom Poole 2019-02-28 16:46:47 +00:00
parent efe197de39
commit 2ef4ea53cf

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;