FastLED 3.9.15
Loading...
Searching...
No Matches

◆ compact()

template<typename Key, typename Value, typename Equal = fl::SmallMapEqualTo<Key>>
void fl::unordered_map_small< Key, Value, Equal >::compact ( )
inline

Definition at line 390 of file unordered_map_small.h.

390 {
391 size_type write = 0;
392 for (size_type read = 0; read < mData.size(); ++read) {
393 if (mOccupied.test(read)) {
394 if (write != read) {
396 }
397 ++write;
398 }
399 }
400 // Trim vector to alive count
401 while (mData.size() > write) mData.pop_back();
402 // Rebuild bitmap — all slots occupied
404 for (size_type i = 0; i < write; ++i) {
405 mOccupied.set(i);
406 }
407 }
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
Definition s16x16x4.h:28

References FL_NOEXCEPT, mData, mOccupied, fl::fl::move(), and fl::read().

+ Here is the call graph for this function: