Skip to content

Commit

Permalink
cpp: remove unnecessary comment
Browse files Browse the repository at this point in the history
There is no need to add the object to a transaction on pointer_to.
  • Loading branch information
tomaszkapela committed Jul 4, 2017
1 parent 7e67feb commit 317b317
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/include/libpmemobj++/persistent_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,6 @@ class persistent_ptr : public detail::persistent_ptr_base<T> {
static persistent_ptr<T>
pointer_to(T &ref)
{
/*
* XXX do we really want this to happen automatically for the
* whole object??
* auto oid = pmemobj_oid_from_ptr(&ref);
* if (!OID_IS_NULL(oid) &&
* (pmemobj_tx_stage() == TX_STAGE_WORK)) {
* pmemobj_tx_add_range(oid, sizeof(T));
* }
*/
return persistent_ptr<T>(std::addressof(ref), 0);
}

Expand Down

0 comments on commit 317b317

Please sign in to comment.