/*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
//===================================================================
~ConcurrentSkipList() {
- /* static */ if (NodeType::template destroyIsNoOp<NodeAlloc>()) {
+ /* static */ if (NodeType::template DestroyIsNoOp<NodeAlloc>::value) {
// Avoid traversing the list if using arena allocator.
return;
}
// if found, succs[0..foundLayer] need to point to the cached foundNode,
// as foundNode might be deleted at the same time thus pred->skip() can
- // return NULL or another node.
+ // return nullptr or another node.
succs[layer] = foundNode ? foundNode : node;
}
return foundLayer;
friend class boost::iterator_core_access;
template<class,class> friend class csl_iterator;
- void increment() { node_ = node_->next(); };
+ void increment() { node_ = node_->next(); }
bool equal(const csl_iterator& other) const { return node_ == other.node_; }
value_type& dereference() const { return node_->data(); }
}
int max_layer = maxLayer();
for (int i = 0; i < max_layer; ++i) {
- hints_[i] = i + 1;
+ hints_[i] = uint8_t(i + 1);
}
hints_[max_layer] = max_layer;
}