From 7bed9716a3f42b6acbe679175fc1289b238d4309 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 7 May 2021 13:14:33 +0800 Subject: [PATCH] crimson/common/config_proxy: add a helper for get_val<>() otherwise we have to put something like local_conf().template get_val(name) which is not quite convenient or readable. Signed-off-by: Kefu Chai --- src/crimson/common/config_proxy.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/crimson/common/config_proxy.h b/src/crimson/common/config_proxy.h index f50a634318824..f7611a6b4fc55 100644 --- a/src/crimson/common/config_proxy.h +++ b/src/crimson/common/config_proxy.h @@ -197,4 +197,9 @@ inline ConfigProxy::ShardedConfig& sharded_conf() { return ConfigProxy::sharded_conf; } +template +const T get_conf(const std::string& key) { + return local_conf().template get_val(key); +} + } -- 2.39.5