* @brief Get the value at a given index and remove it from the map, without destroying it * @param index * @retval V* * @note The returned object must be freed by the caller when no longer required */
| 289 | * @note The returned object must be freed by the caller when no longer required |
| 290 | */ |
| 291 | V* extractAt(unsigned index) |
| 292 | { |
| 293 | std::unique_ptr<V> value; |
| 294 | if(index < entries.count()) { |
| 295 | entries[index].value.swap(value); |
| 296 | entries.remove(index); |
| 297 | } |
| 298 | return value.release(); |
| 299 | } |
| 300 | |
| 301 | /** |
| 302 | * @brief Clear the map of all entries |
no test coverage detected