FastLED
3.9.15
Loading...
Searching...
No Matches
◆
operator[]()
template<typename
Key
, typename Value, typename Less = fl::DefaultLess<Key>>
Value &
fl::SortedHeapMap
<
Key
, Value, Less >::operator[]
(
const
Key
&
key
)
inline
Definition at line
395
of file
map.h
.
395
{
396
iterator
it
=
find
(
key
);
397
if
(
it
!=
end
()) {
398
return
it
->second;
399
}
400
Pair
pair
(
key
,
Value
());
401
bool
ok
=
data
.insert(
pair
);
402
FASTLED_ASSERT
(
ok
,
"Failed to insert into SortedHeapMap"
);
403
return
data
.find(
pair
)->second;
// TODO: optimize.
404
}
FASTLED_ASSERT
#define FASTLED_ASSERT(x, MSG)
Definition
assert.h:9
fl::SortedHeapMap::end
iterator end()
Definition
map.h:347
fl::SortedHeapMap::iterator
SortedHeapVector< Pair, PairLess >::iterator iterator
Definition
map.h:278
fl::SortedHeapMap::find
iterator find(const Key &key)
Definition
map.h:351
fl::SortedHeapMap::data
SortedHeapVector< Pair, PairLess > data
Definition
map.h:274
fl::SortedHeapMap
Definition
map.h:257
fl::SortedHeapMap::Pair
Definition
map.h:259
fl
SortedHeapMap
Generated on Fri Apr 18 2025 03:39:32 for FastLED by
1.13.2