From d6d8be6519185d2e78ba7de5c68e6b7c9733b6f2 Mon Sep 17 00:00:00 2001 From: Philip Hyunsu Cho Date: Sun, 14 Jun 2020 09:36:13 +0000 Subject: [PATCH] Add explicit cast to pass 32-bit CRAN check (#5777) --- src/c_api/c_api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c_api/c_api.cc b/src/c_api/c_api.cc index 0ba795a39..0870c6cc5 100644 --- a/src/c_api/c_api.cc +++ b/src/c_api/c_api.cc @@ -181,7 +181,7 @@ XGB_DLL int XGDMatrixSliceDMatrixEx(DMatrixHandle handle, << "slice does not support group structure"; } DMatrix* dmat = static_cast*>(handle)->get(); - *out = new std::shared_ptr(dmat->Slice({idxset, len})); + *out = new std::shared_ptr(dmat->Slice({idxset, static_cast(len)})); API_END(); }