Use nullptr rather than 0 when initializing pointers
authorChristopher Dykes <cdykes@fb.com>
Wed, 18 Oct 2017 16:49:45 +0000 (09:49 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 18 Oct 2017 16:51:38 +0000 (09:51 -0700)
commitd7ea6b714258b732407cef68072f55ee4d24f00c
treede973ae9be25b94322bb4b00248b2251b836bce7
parentdca6f3ea44d8fb0aaa1d4ae6761694b4ae9d0965
Use nullptr rather than 0 when initializing pointers

Summary:
Because we do this in a few places, and `nullptr` makes it far clearer what the intention is.
Note that with `-Wzero-as-null-pointer-constant` under GCC, doing `std::function<void()> f = {}` initializes `f` with a `0` rather than `nullptr`, triggering the warning, so I've enabled it there as well.
It is not currently possible to actually enable `-Wzero-as-null-pointer-constant`, because GCC 5 reports conversions resulting from a default value as occuring at the call-site rather than at the location where the parameter is defined, and the default allocator in libstdc++ is not clean for this particular warning -_-...

Reviewed By: yfeldblum

Differential Revision: D6046746

fbshipit-source-id: 6135bb20a503c861838575cf973324d74d75ca69
folly/Hash.h
folly/PackedSyncPtr.h
folly/String.cpp
folly/fibers/BoostContextCompatibility.h
folly/hash/test/SpookyHashV1Test.cpp
folly/hash/test/SpookyHashV2Test.cpp
folly/test/AtomicHashMapTest.cpp