X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=blobdiff_plain;f=folly%2FPackedSyncPtr.h;h=f6c87adff47c4481299973e2048606897a3f3cca;hp=a5dd51847ad99625e209d027e61b840458d95f7f;hb=3d02424285435ed6b70d7207d37304a28c5e5707;hpb=aa86aa272abff08c186edee58561ec19abb70f6e diff --git a/folly/PackedSyncPtr.h b/folly/PackedSyncPtr.h index a5dd5184..f6c87adf 100644 --- a/folly/PackedSyncPtr.h +++ b/folly/PackedSyncPtr.h @@ -1,5 +1,5 @@ /* - * 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. @@ -74,7 +74,7 @@ class PackedSyncPtr { * (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