FastLED
3.10.8
Loading...
Searching...
No Matches
◆
operator=()
[1/3]
template<typename
Key
, typename T, typename
Hash
= Hash<Key>, typename KeyEqual = EqualTo<Key>, int INLINED_COUNT = FASTLED_HASHMAP_INLINED_COUNT>
unordered_map
&
fl::unordered_map
<
Key
, T,
Hash
, KeyEqual, INLINED_COUNT >::operator=
(
const
unordered_map
<
Key
, T,
Hash
, KeyEqual, INLINED_COUNT > &
other
)
inline
Definition at line
125
of file
unordered_map.h
.
125
{
126
if
(
this
!= &
other
) {
127
// Clear current content
128
clear
();
129
130
// Resize if necessary
131
if
(
_buckets
.size() !=
other
.
_buckets
.size()) {
132
_buckets
.clear();
133
_buckets
.assign(
other
.
_buckets
.size(),
Entry
{});
134
_occupied
.reset();
135
_occupied
.resize(
other
.
_buckets
.size());
136
_deleted
.reset();
137
_deleted
.resize(
other
.
_buckets
.size());
138
}
139
140
// Copy all occupied entries
141
for
(
fl::size
i
= 0;
i
<
other
.
_buckets
.size(); ++
i
) {
142
if
(
other
.
is_occupied
(
i
)) {
143
_buckets
[
i
] =
other
.
_buckets
[
i
];
144
mark_occupied
(
i
);
145
++
_size
;
146
}
147
}
148
149
mLoadFactor
=
other
.
mLoadFactor
;
150
_hash
=
other
.
_hash
;
151
_equal
=
other
.
_equal
;
152
}
153
return
*
this
;
154
}
fl::unordered_map::_hash
Hash _hash
Definition
unordered_map.h:1051
fl::unordered_map::_occupied
fl::bitset< 1024 > _occupied
Definition
unordered_map.h:1049
fl::unordered_map::is_occupied
bool is_occupied(fl::size idx) const FL_NO_EXCEPT
Definition
unordered_map.h:808
fl::unordered_map::mLoadFactor
u8 mLoadFactor
Definition
unordered_map.h:1048
fl::unordered_map::clear
void clear() FL_NO_EXCEPT
Definition
unordered_map.h:595
fl::unordered_map::_equal
KeyEqual _equal
Definition
unordered_map.h:1052
fl::unordered_map::_buckets
fl::vector_inlined< Entry, INLINED_COUNT > _buckets
Definition
unordered_map.h:1045
fl::unordered_map::_size
fl::size _size
Definition
unordered_map.h:1046
fl::unordered_map::mark_occupied
void mark_occupied(fl::size idx) FL_NO_EXCEPT
Definition
unordered_map.h:816
fl::unordered_map::_deleted
fl::bitset< 1024 > _deleted
Definition
unordered_map.h:1050
fl::unordered_map
Definition
unordered_map.h:59
fl
unordered_map
Generated on Sun Oct 18 2026 00:57:09 for FastLED by
1.13.2