]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
common: a simple API to extract md_config_cacher_t cached value
authorRonen Friedman <rfriedma@redhat.com>
Wed, 13 Nov 2024 09:02:00 +0000 (03:02 -0600)
committerRonen Friedman <rfriedma@redhat.com>
Tue, 19 Nov 2024 13:37:17 +0000 (07:37 -0600)
Using a type-deduced operator() (i.e. my_opt() ), instead of the
existing ValueT() operator (which requires a type-matching cast).

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/common/config_cacher.h

index a84bad08eee8988843f90920003e1af49ff04a0a..206cfa7026384a81561ef1ffc6f6804bc5f84685 100644 (file)
@@ -53,6 +53,10 @@ public:
   operator ValueT() const {
     return value_cache.load();
   }
+
+  ValueT operator*() const {
+    return value_cache.load();
+  }
 };
 
 #endif // CEPH_CONFIG_CACHER_H