FastLED 3.9.15
Loading...
Searching...
No Matches

◆ operator==()

template<typename Key, typename Value, typename Compare = less<Key>, typename Allocator = allocator_slab<char>>
bool fl::MapRedBlackTree< Key, Value, Compare, Allocator >::operator== ( const MapRedBlackTree< Key, Value, Compare, Allocator > & other) const
inline

Definition at line 1392 of file rbtree.h.

1392 {
1393 if (mTree.size() != other.mTree.size()) return false;
1394
1395 auto it1 = mTree.begin();
1396 auto it2 = other.mTree.begin();
1397
1398 while (it1 != mTree.end() && it2 != other.mTree.end()) {
1399 // Compare both key and value
1400 if (it1->first != it2->first || it1->second != it2->second) {
1401 return false;
1402 }
1403 ++it1;
1404 ++it2;
1405 }
1406
1407 return it1 == mTree.end() && it2 == other.mTree.end();
1408 }
fl::size size() const
Definition rbtree.h:810
iterator end()
Definition rbtree.h:769
iterator begin()
Definition rbtree.h:755