X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=blobdiff_plain;f=folly%2FPackedSyncPtr.h;h=a49b0270d0c25a23b699ab9b7701ee3cbfb927a7;hp=692fbf9bac43dd4a9121452e6d9e8e0ebf4c3a93;hb=9b471821c6bf11a45e3ad9cb20ad6e5616efe089;hpb=520e20a8baebc98a5ec84d67865da4cf9819f88a diff --git a/folly/PackedSyncPtr.h b/folly/PackedSyncPtr.h index 692fbf9b..a49b0270 100644 --- a/folly/PackedSyncPtr.h +++ b/folly/PackedSyncPtr.h @@ -23,7 +23,7 @@ #include #include -#if !FOLLY_X64 && !FOLLY_PPC64 && !FOLLY_A64 +#if !FOLLY_X64 && !FOLLY_PPC64 && !FOLLY_AARCH64 #error "PackedSyncPtr is x64, ppc64 or aarch64 specific code." #endif @@ -59,14 +59,14 @@ namespace folly { -template +template class PackedSyncPtr { // This just allows using this class even with T=void. Attempting // to use the operator* or operator[] on a PackedSyncPtr will // still properly result in a compile error. typedef typename std::add_lvalue_reference::type reference; -public: + public: /* * If you default construct one of these, you must call this init() * function before using it. @@ -74,7 +74,7 @@ public: * (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(initialPtr); CHECK(!(intPtr >> 48)); data_.init(intPtr); @@ -150,4 +150,4 @@ std::ostream& operator<<(std::ostream& os, const PackedSyncPtr& ptr) { os << "PackedSyncPtr(" << ptr.get() << ", " << ptr.extra() << ")"; return os; } -} +} // namespace folly