Clean up C++ warnings (#6213)

This commit is contained in:
Igor Moura
2020-10-19 12:02:33 -03:00
committed by GitHub
parent ddf37cca30
commit d1254808d5
20 changed files with 78 additions and 89 deletions

View File

@@ -75,8 +75,9 @@ class GradientBooster : public Model, public Configurable {
* \param prediction The output prediction cache entry that needs to be updated.
* the booster may change content of gpair
*/
virtual void DoBoost(DMatrix* p_fmat, HostDeviceVector<GradientPair>* in_gpair,
PredictionCacheEntry *prediction) = 0;
virtual void DoBoost(DMatrix* p_fmat,
HostDeviceVector<GradientPair>* in_gpair,
PredictionCacheEntry*) = 0;
/*!
* \brief generate predictions for given feature matrix
@@ -103,10 +104,10 @@ class GradientBooster : public Model, public Configurable {
* \param layer_begin (Optional) Begining of boosted tree layer used for prediction.
* \param layer_end (Optional) End of booster layer. 0 means do not limit trees.
*/
virtual void InplacePredict(dmlc::any const &x, float missing,
PredictionCacheEntry *out_preds,
uint32_t layer_begin = 0,
uint32_t layer_end = 0) const {
virtual void InplacePredict(dmlc::any const &, float,
PredictionCacheEntry*,
uint32_t,
uint32_t) const {
LOG(FATAL) << "Inplace predict is not supported by current booster.";
}
/*!

View File

@@ -41,14 +41,14 @@ class Metric : public Configurable {
* override this function to maintain internal configuration
* \param in JSON object containing the configuration
*/
void LoadConfig(Json const& in) override {}
void LoadConfig(Json const&) override {}
/*!
* \brief Save configuration to JSON object
* By default, metric has no internal configuration;
* override this function to maintain internal configuration
* \param out pointer to output JSON object
*/
void SaveConfig(Json* out) const override {}
void SaveConfig(Json*) const override {}
/*!
* \brief evaluate a specific metric

View File

@@ -53,7 +53,7 @@ class ObjFunction : public Configurable {
* \brief transform prediction values, this is only called when Prediction is called
* \param io_preds prediction values, saves to this vector as well
*/
virtual void PredTransform(HostDeviceVector<bst_float> *io_preds) {}
virtual void PredTransform(HostDeviceVector<bst_float>*) {}
/*!
* \brief transform prediction values, this is only called when Eval is called,