Fix warning on Windows. (#6883)
This commit is contained in:
parent
a347ef7c66
commit
a6d1fbf8d1
@ -734,8 +734,9 @@ XGB_DLL int XGBoosterPredictFromCSR(BoosterHandle handle, char const *indptr,
|
|||||||
API_BEGIN();
|
API_BEGIN();
|
||||||
CHECK_HANDLE();
|
CHECK_HANDLE();
|
||||||
std::shared_ptr<xgboost::data::CSRArrayAdapter> x{
|
std::shared_ptr<xgboost::data::CSRArrayAdapter> x{
|
||||||
new xgboost::data::CSRArrayAdapter{
|
new xgboost::data::CSRArrayAdapter{StringView{indptr},
|
||||||
StringView{indptr}, StringView{indices}, StringView{data}, cols}};
|
StringView{indices}, StringView{data},
|
||||||
|
static_cast<size_t>(cols)}};
|
||||||
std::shared_ptr<DMatrix> p_m {nullptr};
|
std::shared_ptr<DMatrix> p_m {nullptr};
|
||||||
if (m) {
|
if (m) {
|
||||||
p_m = *static_cast<std::shared_ptr<DMatrix> *>(m);
|
p_m = *static_cast<std::shared_ptr<DMatrix> *>(m);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user