From a3f9323467e60b0943c4c89046b6f1f48f61e5c4 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Thu, 22 Feb 2024 00:08:04 -0600 Subject: [PATCH] policy_cache.hpp --- src/policy_cache.hpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/policy_cache.hpp b/src/policy_cache.hpp index b7a873b5..dbee1ee0 100644 --- a/src/policy_cache.hpp +++ b/src/policy_cache.hpp @@ -51,13 +51,14 @@ public: std::string* find(char const *key_) { - Map::const_iterator i; - - i = _cache.find(key_); - if(i == _cache.end()) - return NULL; - - return &i->second; + std::string rv; + auto func = + [&](const auto &v) + { + rv = v; + }; + + _cache.visit(key_, [] } void