cpp-lru-cache icon indicating copy to clipboard operation
cpp-lru-cache copied to clipboard

Is Unneeded code?

Open zh820952173 opened this issue 3 years ago • 1 comments

_cache_items_map.erase(it); Is the line of code redundent?

zh820952173 avatar Jul 01 '22 12:07 zh820952173

_cache_items_map[key] = _cache_items_list.begin(); Reference to the mapped value of the new element if no element with key key existed. Otherwise a reference to the mapped value of the existing element whose key is equivalent to key.

zh820952173 avatar Jul 01 '22 17:07 zh820952173