Skip to content

Commit

Permalink
Fix NDK Build. (#5886)
Browse files Browse the repository at this point in the history
* Explicit cast for slice.
  • Loading branch information
trivialfis authored Jul 14, 2020
1 parent 970b4b3 commit 3cae287
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/c_api/c_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ 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();
}

Expand Down

0 comments on commit 3cae287

Please sign in to comment.