FastLED
3.9.15
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
124
of file
unordered_map.h
.
124
{
125
if
(
this
!= &
other
) {
126
// Clear current content
127
clear
();
128
129
// Resize if necessary
130
if
(
_buckets
.size() !=
other
.
_buckets
.size()) {
131
_buckets
.clear();
132
_buckets
.assign(
other
.
_buckets
.size(),
Entry
{});
133
_occupied
.reset();
134
_occupied
.resize(
other
.
_buckets
.size());
135
_deleted
.reset();
136
_deleted
.resize(
other
.
_buckets
.size());
137
}
138
139
// Copy all occupied entries
140
for
(
fl::size
i
= 0;
i
<
other
.
_buckets
.size(); ++
i
) {
141
if
(
other
.
is_occupied
(
i
)) {
142
_buckets
[
i
] =
other
.
_buckets
[
i
];
143
mark_occupied
(
i
);
144
++
_size
;
145
}
146
}
147
148
mLoadFactor
=
other
.
mLoadFactor
;
149
_hash
=
other
.
_hash
;
150
_equal
=
other
.
_equal
;
151
}
152
return
*
this
;
153
}
fl::unordered_map::_hash
Hash _hash
Definition
unordered_map.h:1123
fl::unordered_map::_occupied
fl::bitset< 1024 > _occupied
Definition
unordered_map.h:1121
fl::unordered_map::mark_occupied
void mark_occupied(fl::size idx)
Definition
unordered_map.h:817
fl::unordered_map::mLoadFactor
u8 mLoadFactor
Definition
unordered_map.h:1120
fl::unordered_map::_equal
KeyEqual _equal
Definition
unordered_map.h:1124
fl::unordered_map::_buckets
fl::vector_inlined< Entry, INLINED_COUNT > _buckets
Definition
unordered_map.h:1117
fl::unordered_map::_size
fl::size _size
Definition
unordered_map.h:1118
fl::unordered_map::is_occupied
bool is_occupied(fl::size idx) const
Definition
unordered_map.h:809
fl::unordered_map::_deleted
fl::bitset< 1024 > _deleted
Definition
unordered_map.h:1122
fl::unordered_map::clear
void clear()
Definition
unordered_map.h:596
fl::unordered_map
Definition
unordered_map.h:58
fl
unordered_map
Generated on Tue Jun 16 2026 00:07:07 for FastLED by
1.13.2