mirror of
https://github.com/trapexit/mergerfs.git
synced 2025-02-27 19:23:00 +08:00
policy_cache.hpp
This commit is contained in:
parent
416aa54185
commit
a3f9323467
@ -51,13 +51,14 @@ public:
|
|||||||
std::string*
|
std::string*
|
||||||
find(char const *key_)
|
find(char const *key_)
|
||||||
{
|
{
|
||||||
Map::const_iterator i;
|
std::string rv;
|
||||||
|
auto func =
|
||||||
i = _cache.find(key_);
|
[&](const auto &v)
|
||||||
if(i == _cache.end())
|
{
|
||||||
return NULL;
|
rv = v;
|
||||||
|
};
|
||||||
return &i->second;
|
|
||||||
|
_cache.visit(key_, []
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user