mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-21 01:24:21 +00:00
Ignore empty unique ID when checking for juce::PluginDescription duplicates
This commit is contained in:
parent
e5fc50908e
commit
04f41b670d
1 changed files with 13 additions and 4 deletions
|
|
@ -28,12 +28,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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue