/*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2011-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.
#include <folly/Portability.h>
#include <folly/SmallLocks.h>
-#if !FOLLY_X64 && !FOLLY_PPC64 && !FOLLY_A64
+#if !FOLLY_X64 && !FOLLY_PPC64 && !FOLLY_AARCH64
#error "PackedSyncPtr is x64, ppc64 or aarch64 specific code."
#endif
// still properly result in a compile error.
typedef typename std::add_lvalue_reference<T>::type reference;
-public:
+ public:
/*
* If you default construct one of these, you must call this init()
* function before using it.
* (We are avoiding a constructor to ensure gcc allows us to put
* this class in packed structures.)
*/
- void init(T* initialPtr = 0, uint16_t initialExtra = 0) {
+ void init(T* initialPtr = nullptr, uint16_t initialExtra = 0) {
auto intPtr = reinterpret_cast<uintptr_t>(initialPtr);
CHECK(!(intPtr >> 48));
data_.init(intPtr);
os << "PackedSyncPtr(" << ptr.get() << ", " << ptr.extra() << ")";
return os;
}
-}
+} // namespace folly