Browse Source

Bugfix: BlockTopology::operator== now does unordered connection comparison

tags/2021-05-28
Rachel Susser hogliux 7 years ago
parent
commit
8281a29bc9
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp

+ 3
- 2
modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp View File

@@ -2358,7 +2358,8 @@ const char* const* PhysicalTopologySource::getStandardLittleFootFunctions() noex
return BlocksProtocol::ledProgramLittleFootFunctions;
}
static bool blocksMatch (const Block::Array& list1, const Block::Array& list2) noexcept
template <typename ListType>
static bool collectionsMatch (const ListType& list1, const ListType& list2) noexcept
{
if (list1.size() != list2.size())
return false;
@@ -2372,7 +2373,7 @@ static bool blocksMatch (const Block::Array& list1, const Block::Array& list2) n
bool BlockTopology::operator== (const BlockTopology& other) const noexcept
{
return connections == other.connections && blocksMatch (blocks, other.blocks);
return collectionsMatch (connections, other.connections) && collectionsMatch (blocks, other.blocks);
}
bool BlockTopology::operator!= (const BlockTopology& other) const noexcept


Loading…
Cancel
Save