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 883 of file rbtree.h.

883 {
884 if (mTree.size() != other.mTree.size()) return false;
885
886 auto it1 = mTree.begin();
887 auto it2 = other.mTree.begin();
888
889 while (it1 != mTree.end() && it2 != other.mTree.end()) {
890 // Compare both key and value
891 if (it1->first != it2->first || it1->second != it2->second) {
892 return false;
893 }
894 ++it1;
895 ++it2;
896 }
897
898 return it1 == mTree.end() && it2 == other.mTree.end();
899 }
fl::size size() const
Definition rbtree.h:553
iterator end()
Definition rbtree.h:539
iterator begin()
Definition rbtree.h:525