Fix color @usernames sometimes not working at all (#3170)
Definitely memory fuckery involved - The comment from @lubieerror https://github.com/Chatterino/chatterino2/issues/2822#issuecomment-897252673 is finally what led me to adding tests and hopefully fixing this.
This commit is contained in:
@@ -35,6 +35,7 @@ public:
|
||||
lru_cache(lru_cache<key_t, value_t> &&other)
|
||||
: _cache_items_list(std::move(other._cache_items_list))
|
||||
, _cache_items_map(std::move(other._cache_items_map))
|
||||
, _max_size(other._max_size)
|
||||
{
|
||||
other._cache_items_list.clear();
|
||||
other._cache_items_map.clear();
|
||||
@@ -44,6 +45,7 @@ public:
|
||||
{
|
||||
_cache_items_list = std::move(other._cache_items_list);
|
||||
_cache_items_map = std::move(other._cache_items_map);
|
||||
_max_size = other._max_size;
|
||||
other._cache_items_list.clear();
|
||||
other._cache_items_map.clear();
|
||||
return *this;
|
||||
|
||||
Reference in New Issue
Block a user