Signed-off-by: John Spray <john.spray@redhat.com>
dout(4) << __func__ << " key: " << global_key << dendl;
- if (store_cache.count(global_key)) {
- *val = store_cache.at(global_key);
+ auto i = store_cache.find(global_key);
+ if (i != store_cache.end()) {
+ *val = i->second;
return true;
} else {
return false;
Mutex::Locker lock(module_config.lock);
- if (module_config.config.count(global_key)) {
- *val = module_config.config.at(global_key);
+ auto i = module_config.config.find(global_key);
+ if (i != module_config.config.end()) {
+ *val = i->second;
return true;
} else {
return false;