1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-31 03:00:05 +00:00
This commit is contained in:
seb-nektar 2025-08-19 13:47:31 +08:00 committed by GitHub
commit a65efe4d89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,12 +37,21 @@ namespace juce
bool PluginDescription::isDuplicateOf (const PluginDescription& other) const noexcept
{
const auto tie = [] (const PluginDescription& d)
if ((other.fileOrIdentifier == fileOrIdentifier) &&
(other.deprecatedUid == deprecatedUid))
{
return std::tie (d.fileOrIdentifier, d.deprecatedUid, d.uniqueId);
};
// Only compare uniqueId field if it is set in both descriptions
if ((other.uniqueId > 0) && (uniqueId > 0))
{
return (other.uniqueId == uniqueId);
}
else
{
return true;
}
}
return tie (*this) == tie (other);
return false;
}
static String getPluginDescSuffix (const PluginDescription& d, int uid)