Add explicit cast to pass 32-bit CRAN check (#5777)
This commit is contained in:
parent
34408a7fdc
commit
d6d8be6519
@ -181,7 +181,7 @@ XGB_DLL int XGDMatrixSliceDMatrixEx(DMatrixHandle handle,
|
||||
<< "slice does not support group structure";
|
||||
}
|
||||
DMatrix* dmat = static_cast<std::shared_ptr<DMatrix>*>(handle)->get();
|
||||
*out = new std::shared_ptr<DMatrix>(dmat->Slice({idxset, len}));
|
||||
*out = new std::shared_ptr<DMatrix>(dmat->Slice({idxset, static_cast<std::size_t>(len)}));
|
||||
API_END();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user