Commit d2604fb2 authored by Bennett Magy's avatar Bennett Magy Committed by Facebook Github Bot

Added getShared function to Observer::Snapshot

Summary:
Added a function to Observer::Snapshot that allows the user to get the shared_ptr held in a snapshot. This is to make it easier to integrate Observers with other Api's that expect shared_ptrs.

(Note: this ignores all push blocking failures!)

Reviewed By: andriigrynenko

Differential Revision: D6909245

fbshipit-source-id: 4fe108e04f43a5a250bd7bdc3031994833d73a60
parent 63fcb6c7
......@@ -91,6 +91,10 @@ class Snapshot {
return data_.get();
}
std::shared_ptr<const T> getShared() const {
return data_;
}
/**
* Return the version of the observed object.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment