FastLED
3.10.9
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
127
of file
unordered_map.h
.
127
{
128
if
(
this
!= &
other
) {
129
// Clear current content
130
clear
();
131
132
// Resize if necessary
133
if
(
_buckets
.size() !=
other
.
_buckets
.size()) {
134
_buckets
.clear();
135
_buckets
.assign(
other
.
_buckets
.size(),
Entry
{});
136
_occupied
.reset();
137
_occupied
.resize(
other
.
_buckets
.size());
138
_deleted
.reset();
139
_deleted
.resize(
other
.
_buckets
.size());
140
}
141
142
// Copy all occupied entries
143
for
(
fl::size
i
= 0;
i
<
other
.
_buckets
.size(); ++
i
) {
144
if
(
other
.
is_occupied
(
i
)) {
145
_buckets
[
i
] =
other
.
_buckets
[
i
];
146
mark_occupied
(
i
);
147
++
_size
;
148
}
149
}
150
151
mLoadFactor
=
other
.
mLoadFactor
;
152
_hash
=
other
.
_hash
;
153
_equal
=
other
.
_equal
;
154
}
155
return
*
this
;
156
}
fl::unordered_map::_hash
Hash _hash
Definition
unordered_map.h:1084
fl::unordered_map::_occupied
fl::bitset< 1024 > _occupied
Definition
unordered_map.h:1082
fl::unordered_map::is_occupied
bool is_occupied(fl::size idx) const FL_NO_EXCEPT
Definition
unordered_map.h:810
fl::unordered_map::mLoadFactor
u8 mLoadFactor
Definition
unordered_map.h:1081
fl::unordered_map::clear
void clear() FL_NO_EXCEPT
Definition
unordered_map.h:597
fl::unordered_map::_equal
KeyEqual _equal
Definition
unordered_map.h:1085
fl::unordered_map::_buckets
fl::vector_inlined< Entry, INLINED_COUNT > _buckets
Definition
unordered_map.h:1078
fl::unordered_map::_size
fl::size _size
Definition
unordered_map.h:1079
fl::unordered_map::mark_occupied
void mark_occupied(fl::size idx) FL_NO_EXCEPT
Definition
unordered_map.h:818
fl::unordered_map::_deleted
fl::bitset< 1024 > _deleted
Definition
unordered_map.h:1083
fl::unordered_map
Definition
unordered_map.h:61
fl
unordered_map
Generated on Mon Nov 2 2026 09:25:25 for FastLED by
1.13.2