From a2e7a4d04030718ec10a6878720ae0986d2676c9 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Fri, 16 Feb 2024 00:11:45 -0600 Subject: [PATCH] policy_cache.hpp --- src/policy_cache.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/policy_cache.hpp b/src/policy_cache.hpp index f892907c..54d68d2d 100644 --- a/src/policy_cache.hpp +++ b/src/policy_cache.hpp @@ -38,13 +38,14 @@ public: } public: - void + const + std::string* insert(std::string const &key_, std::string &val_) { if(_cache.size() > _max_size) _cache.erase(_cache.begin()); - _cache.insert({key_,val_}); + return &_cache.insert({key_,val_}).first; } const