]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore: add const cast() method
authorSamuel Just <sjust@redhat.com>
Mon, 13 Jul 2020 22:41:00 +0000 (15:41 -0700)
committerSamuel Just <sjust@redhat.com>
Thu, 16 Jul 2020 23:16:42 +0000 (16:16 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/cached_extent.h

index 6e4bd650a758cecd28ed6eae40be592b1130c082..7ab52f0fa63396af2412c37685a63b8f90836d11 100644 (file)
@@ -171,6 +171,10 @@ public:
   TCachedExtentRef<T> cast() {
     return TCachedExtentRef<T>(static_cast<T*>(this));
   }
+  template <typename T>
+  TCachedExtentRef<const T> cast() const {
+    return TCachedExtentRef<const T>(static_cast<const T*>(this));
+  }
 
   /// Returns true if extent is part of an open transaction
   bool is_pending() const {