Fix copyright lines
[folly.git] / folly / experimental / StampedPtr.h
index ac45c2102da5ff8e1b6fb18f83d8e1004e72b713..de6d98b923a24ecb7f2b1f2c70307d2815ecfe93 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2017-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,7 +16,8 @@
 
 #pragma once
 
-#include <assert.h>
+#include <folly/lang/SafeAssert.h>
+
 #include <stdint.h>
 
 namespace folly {
@@ -106,8 +107,8 @@ struct StampedPtr {
     auto shifted = static_cast<uint64_t>(reinterpret_cast<uintptr_t>(ptr))
         << kInternalStampBits;
     uint64_t raw = shifted | stamp;
-    assert(unpackPtr(raw) == ptr);
-    assert(unpackStamp(raw) == stamp);
+    FOLLY_SAFE_DCHECK(unpackPtr(raw) == ptr, "ptr mismatch.");
+    FOLLY_SAFE_DCHECK(unpackStamp(raw) == stamp, "stamp mismatch.");
     return raw;
   }