Use std::nullptr_t in dynamic
[folly.git] / folly / SparseByteSet.h
index 01809c6b516c0ef53e9598b3d2f3697ea9ecd877..04a03eb8e411b1fb923e75264f35622e847d56cb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 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.
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_FAST_BYTE_SET_H_
-#define FOLLY_FAST_BYTE_SET_H_
+#pragma once
 
 #include <cstdint>
 #include <glog/logging.h>
@@ -63,7 +62,7 @@ class SparseByteSet {
     if (r) {
       DCHECK_LT(size_, kCapacity);
       dense_[size_] = i;
-      sparse_[i] = size_;
+      sparse_[i] = uint8_t(size_);
       size_++;
     }
     return r;
@@ -86,5 +85,3 @@ class SparseByteSet {
 };
 
 }
-
-#endif