Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix warnings #3399

Merged
merged 7 commits into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/io/dataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ void Dataset::Construct(std::vector<std::unique_ptr<BinMapper>>* bin_mappers,
++cur_fidx;
}
feature_groups_.emplace_back(std::unique_ptr<FeatureGroup>(new FeatureGroup(
cur_cnt_features, group_is_multi_val[i], &cur_bin_mappers, num_data_)));
cur_cnt_features, static_cast<bool>(group_is_multi_val[i]), &cur_bin_mappers, num_data_)));
guolinke marked this conversation as resolved.
Show resolved Hide resolved
}
feature_groups_.shrink_to_fit();
group_bin_boundaries_.clear();
Expand Down
2 changes: 1 addition & 1 deletion src/treelearner/serial_tree_learner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ void SerialTreeLearner::RenewTreeOutput(Tree* tree, const ObjectiveFunction* obj

void SerialTreeLearner::ComputeBestSplitForFeature(
FeatureHistogram* histogram_array_, int feature_index, int real_fidx,
bool is_feature_used, int num_data, const LeafSplits* leaf_splits,
int8_t is_feature_used, int num_data, const LeafSplits* leaf_splits,
SplitInfo* best_split) {
if (!is_feature_used) {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/treelearner/serial_tree_learner.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class SerialTreeLearner: public TreeLearner {
protected:
void ComputeBestSplitForFeature(FeatureHistogram* histogram_array_,
int feature_index, int real_fidx,
bool is_feature_used, int num_data,
int8_t is_feature_used, int num_data,
const LeafSplits* leaf_splits,
SplitInfo* best_split);

Expand Down