Lua exception handling test
[folly.git] / folly / ConcurrentSkipList-inl.h
index cf04ee725d25579a20047c213b3a8c73a5fab209..61279a9652ac1e31b3a023d85c9910903bbc7b9e 100644 (file)
@@ -26,6 +26,7 @@
 #include <mutex>
 #include <type_traits>
 #include <vector>
+
 #include <boost/noncopyable.hpp>
 #include <boost/random.hpp>
 #include <boost/type_traits.hpp>
@@ -41,11 +42,12 @@ template<typename ValT, typename NodeT> class csl_iterator;
 
 template<typename T>
 class SkipListNode : private boost::noncopyable {
-  enum {
+  enum : uint16_t {
     IS_HEAD_NODE = 1,
     MARKED_FOR_REMOVAL = (1 << 1),
     FULLY_LINKED = (1 << 2),
   };
+
  public:
   typedef T value_type;
 
@@ -78,7 +80,7 @@ class SkipListNode : private boost::noncopyable {
   SkipListNode* copyHead(SkipListNode* node) {
     DCHECK(node != nullptr && height_ > node->height_);
     setFlags(node->getFlags());
-    for (int i = 0; i < node->height_; ++i) {
+    for (uint8_t i = 0; i < node->height_; ++i) {
       setSkip(i, node->skip(i));
     }
     return this;