"vscode:/vscode.git/clone" did not exist on "69d02e387a6f4516b991665c9f6ac1378c695492"
Commit 68bd9ab9 authored by Guolin Ke's avatar Guolin Ke
Browse files

some warning fix

parent 1c774687
...@@ -298,7 +298,7 @@ void GBDT::ModelsFromString(const std::string& model_str, int num_used_model) { ...@@ -298,7 +298,7 @@ void GBDT::ModelsFromString(const std::string& model_str, int num_used_model) {
int end = static_cast<int>(i); int end = static_cast<int>(i);
std::string tree_str = Common::Join(lines, start, end, '\n'); std::string tree_str = Common::Join(lines, start, end, '\n');
models_.push_back(new Tree(tree_str)); models_.push_back(new Tree(tree_str));
if (num_used_model > 0 && models_.size() >= num_used_model) { if (num_used_model > 0 && models_.size() >= static_cast<size_t>(num_used_model)) {
break; break;
} }
} else { } else {
......
...@@ -158,4 +158,4 @@ private: ...@@ -158,4 +158,4 @@ private:
}; };
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_BOOSTING_GBDT_H_ #endif // LightGBM_BOOSTING_GBDT_H_
...@@ -77,4 +77,4 @@ private: ...@@ -77,4 +77,4 @@ private:
}; };
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_BOOSTING_SCORE_UPDATER_HPP_ #endif // LightGBM_BOOSTING_SCORE_UPDATER_HPP_
...@@ -169,4 +169,4 @@ BinIterator* DenseBin<VAL_T>::GetIterator(data_size_t) const { ...@@ -169,4 +169,4 @@ BinIterator* DenseBin<VAL_T>::GetIterator(data_size_t) const {
return new DenseBinIterator<VAL_T>(this); return new DenseBinIterator<VAL_T>(this);
} }
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_IO_DENSE_BIN_HPP_ #endif // LightGBM_IO_DENSE_BIN_HPP_
...@@ -129,4 +129,4 @@ private: ...@@ -129,4 +129,4 @@ private:
std::vector<data_size_t> leaf_cnt_; std::vector<data_size_t> leaf_cnt_;
}; };
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_IO_ORDERED_SPARSE_BIN_HPP_ #endif // LightGBM_IO_ORDERED_SPARSE_BIN_HPP_
...@@ -102,4 +102,4 @@ public: ...@@ -102,4 +102,4 @@ public:
} }
}; };
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_IO_PARSER_HPP_ #endif // LightGBM_IO_PARSER_HPP_
...@@ -275,4 +275,4 @@ BinIterator* SparseBin<VAL_T>::GetIterator(data_size_t start_idx) const { ...@@ -275,4 +275,4 @@ BinIterator* SparseBin<VAL_T>::GetIterator(data_size_t start_idx) const {
} }
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_IO_SPARSE_BIN_HPP_ #endif // LightGBM_IO_SPARSE_BIN_HPP_
...@@ -240,4 +240,4 @@ private: ...@@ -240,4 +240,4 @@ private:
}; };
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_METRIC_BINARY_METRIC_HPP_ #endif // LightGBM_METRIC_BINARY_METRIC_HPP_
...@@ -163,4 +163,4 @@ private: ...@@ -163,4 +163,4 @@ private:
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_METRIC_RANK_METRIC_HPP_ #endif // LightGBM_METRIC_RANK_METRIC_HPP_
...@@ -112,4 +112,4 @@ public: ...@@ -112,4 +112,4 @@ public:
}; };
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_METRIC_REGRESSION_METRIC_HPP_ #endif // LightGBM_METRIC_REGRESSION_METRIC_HPP_
...@@ -255,4 +255,4 @@ inline void Linkers::SendRecv(int send_rank, char* send_data, int send_len, ...@@ -255,4 +255,4 @@ inline void Linkers::SendRecv(int send_rank, char* send_data, int send_len,
#endif // USE_MPI #endif // USE_MPI
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_NETWORK_LINKERS_H_ #endif // LightGBM_NETWORK_LINKERS_H_
...@@ -260,4 +260,4 @@ private: ...@@ -260,4 +260,4 @@ private:
} // namespace LightGBM } // namespace LightGBM
#endif // USE_SOCKET #endif // USE_SOCKET
#endif #endif // LightGBM_NETWORK_SOCKET_WRAPPER_HPP_ #endif // LightGBM_NETWORK_SOCKET_WRAPPER_HPP_
...@@ -102,4 +102,4 @@ private: ...@@ -102,4 +102,4 @@ private:
}; };
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_OBJECTIVE_BINARY_OBJECTIVE_HPP_ #endif // LightGBM_OBJECTIVE_BINARY_OBJECTIVE_HPP_
...@@ -233,4 +233,4 @@ private: ...@@ -233,4 +233,4 @@ private:
}; };
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_OBJECTIVE_RANK_OBJECTIVE_HPP_ #endif // LightGBM_OBJECTIVE_RANK_OBJECTIVE_HPP_
...@@ -53,4 +53,4 @@ private: ...@@ -53,4 +53,4 @@ private:
}; };
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_OBJECTIVE_REGRESSION_OBJECTIVE_HPP_ #endif // LightGBM_OBJECTIVE_REGRESSION_OBJECTIVE_HPP_
...@@ -201,4 +201,4 @@ private: ...@@ -201,4 +201,4 @@ private:
}; };
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_TREELEARNER_DATA_PARTITION_HPP_ #endif // LightGBM_TREELEARNER_DATA_PARTITION_HPP_
...@@ -252,4 +252,4 @@ private: ...@@ -252,4 +252,4 @@ private:
}; };
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_TREELEARNER_FEATURE_HISTOGRAM_HPP_ #endif // LightGBM_TREELEARNER_FEATURE_HISTOGRAM_HPP_
...@@ -154,4 +154,4 @@ private: ...@@ -154,4 +154,4 @@ private:
}; };
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_TREELEARNER_LEAF_SPLITS_HPP_ #endif // LightGBM_TREELEARNER_LEAF_SPLITS_HPP_
...@@ -89,5 +89,5 @@ private: ...@@ -89,5 +89,5 @@ private:
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_TREELEARNER_PARALLEL_TREE_LEARNER_H_ #endif // LightGBM_TREELEARNER_PARALLEL_TREE_LEARNER_H_
...@@ -184,4 +184,4 @@ inline void SerialTreeLearner::FindBestSplitForLeaf(LeafSplits* leaf_splits) { ...@@ -184,4 +184,4 @@ inline void SerialTreeLearner::FindBestSplitForLeaf(LeafSplits* leaf_splits) {
} }
} // namespace LightGBM } // namespace LightGBM
#endif #endif // LightGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_ #endif // LightGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment