Skip to content

Commit 85f72f1

Browse files
r-barnesfacebook-github-bot
authored andcommitted
Fix deprecated use of 0/NULL in gloo/cuda_allreduce_bcube.h + 1
Summary: `nullptr` is typesafe. `0` and `NULL` are not. In the future, only `nullptr` will be allowed. This diff helps us embrace the future _now_ in service of enabling `-Wzero-as-null-pointer-constant`. Reviewed By: palmje Differential Revision: D56650319 fbshipit-source-id: 3d9dbb5972173636c9512677f7d78674f61f1df4
1 parent c83cdab commit 85f72f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gloo/cuda_allreduce_bcube.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,13 @@ class CudaAllreduceBcube : public Algorithm {
251251
void init(
252252
typename std::enable_if<
253253
std::is_same<U, CudaHostWorkspace<T>>::value,
254-
typename U::Pointer>::type* = 0);
254+
typename U::Pointer>::type* = nullptr);
255255

256256
template <typename U = W>
257257
void init(
258258
typename std::enable_if<
259259
std::is_same<U, CudaDeviceWorkspace<T>>::value,
260-
typename U::Pointer>::type* = 0);
260+
typename U::Pointer>::type* = nullptr);
261261
};
262262

263263
namespace cuda {

0 commit comments

Comments
 (0)