X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FConcurrentSkipList-inl.h;h=881d05350bb31b77794c5d097a423d20e1687502;hb=23e45679ddec0cc620ee6fedbb7891e488669bdd;hp=ac6023aa4511d057678af6d7d4b70b4a824e5372;hpb=fbfe105970bcf88e8c123046f84bebdfe24f8801;p=folly.git diff --git a/folly/ConcurrentSkipList-inl.h b/folly/ConcurrentSkipList-inl.h index ac6023aa..881d0535 100644 --- a/folly/ConcurrentSkipList-inl.h +++ b/folly/ConcurrentSkipList-inl.h @@ -138,7 +138,9 @@ class SkipListNode : private boost::noncopyable { height_(height), data_(std::forward(data)) { spinLock_.init(); setFlags(0); - if (isHead) setIsHeadNode(); + if (isHead) { + setIsHeadNode(); + } // need to explicitly init the dynamic atomic pointer array for (uint8_t i = 0; i < height_; ++i) { new (&skip_[i]) std::atomic(nullptr); @@ -253,7 +255,7 @@ class NodeRecycler g(lock_); if (nodes_.get() == nullptr) { - nodes_.reset(new std::vector(1, node)); + nodes_ = std::make_unique>(1, node); } else { nodes_->push_back(node); } @@ -335,4 +337,5 @@ class NodeRecycler