Clean up C++ warnings (#6213)
This commit is contained in:
@@ -29,8 +29,7 @@
|
||||
namespace xgboost {
|
||||
namespace common {
|
||||
|
||||
void GHistIndexMatrix::ResizeIndex(const size_t rbegin, const SparsePage& batch,
|
||||
const size_t n_offsets, const size_t n_index,
|
||||
void GHistIndexMatrix::ResizeIndex(const size_t n_index,
|
||||
const bool isDense) {
|
||||
if ((max_num_bins - 1 <= static_cast<int>(std::numeric_limits<uint8_t>::max())) && isDense) {
|
||||
index.SetBinTypeSize(kUint8BinsTypeSize);
|
||||
@@ -119,7 +118,7 @@ void GHistIndexMatrix::Init(DMatrix* p_fmat, int max_bins) {
|
||||
|
||||
const size_t n_offsets = cut.Ptrs().size() - 1;
|
||||
const size_t n_index = row_ptr[rbegin + batch.Size()];
|
||||
ResizeIndex(rbegin, batch, n_offsets, n_index, isDense);
|
||||
ResizeIndex(n_index, isDense);
|
||||
|
||||
CHECK_GT(cut.Values().size(), 0U);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user