From 0a11b8a30cb5d03fae62d8cd9ac519e272945d73 Mon Sep 17 00:00:00 2001 From: fis Date: Thu, 28 Jul 2022 18:35:39 +0800 Subject: [PATCH] Lint. --- include/xgboost/objective.h | 2 +- src/common/common.h | 2 +- src/common/stats.h | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/xgboost/objective.h b/include/xgboost/objective.h index 2cad8dc2a8c2..0c0d502bdbfb 100644 --- a/include/xgboost/objective.h +++ b/include/xgboost/objective.h @@ -30,7 +30,7 @@ class ObjFunction : public Configurable { Context const* ctx_; public: - static constexpr float DefaultBaseScore() { return 0.5f; }; + static constexpr float DefaultBaseScore() { return 0.5f; } public: /*! \brief virtual destructor */ diff --git a/src/common/common.h b/src/common/common.h index 794d431b0b07..1eaf9ae7f4a0 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -297,7 +297,7 @@ struct Crtp { * \brief C++17 std::as_const */ template -typename std::add_const::type &AsConst(T &v) noexcept { +typename std::add_const::type &AsConst(T &v) noexcept { // NOLINT(runtime/references) return v; } } // namespace common diff --git a/src/common/stats.h b/src/common/stats.h index 8165cb75ae1a..547063c43a56 100644 --- a/src/common/stats.h +++ b/src/common/stats.h @@ -93,14 +93,15 @@ float WeightedQuantile(double alpha, Iter begin, Iter end, WeightIter weights) { } namespace cuda { -float Median(Context const* ctx, linalg::TensorView t, common::OptionalWeights weights); +float Median(Context const* ctx, linalg::TensorView t, + common::OptionalWeights weights); #if !defined(XGBOOST_USE_CUDA) inline float Median(Context const*, linalg::TensorView, common::OptionalWeights) { common::AssertGPUSupport(); return 0; } #endif // !defined(XGBOOST_USE_CUDA) -} +} // namespace cuda inline float Median(Context const* ctx, linalg::TensorView t, common::OptionalWeights weights) {