From 1edf89ca5ab697abcdaeead970b350f87a916f57 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Thu, 15 Feb 2024 20:33:12 -0600 Subject: [PATCH] policy_cache.hpp --- src/policy_cache.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/policy_cache.hpp b/src/policy_cache.hpp index 172758f5..ad15854c 100644 --- a/src/policy_cache.hpp +++ b/src/policy_cache.hpp @@ -67,7 +67,7 @@ public: cleanup() { while(_cache.size() > _max_size) - _cache.erase(_cache.begin()); + _cache.erase((_cache.size() & 1) ? _cache.begin() : _cache.rbegin()); } void