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
Showing
Please register or sign in to comment