Skip to content

Commit

Permalink
Lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jul 28, 2022
1 parent 69d1f32 commit 10c9c8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/xgboost/objective.h
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/common/common.h
Expand Up @@ -297,7 +297,7 @@ struct Crtp {
* \brief C++17 std::as_const
*/
template <typename T>
typename std::add_const<T>::type &AsConst(T &v) noexcept {
typename std::add_const<T>::type &AsConst(T &v) noexcept { // NOLINT(runtime/references)
return v;
}
} // namespace common
Expand Down
5 changes: 3 additions & 2 deletions src/common/stats.h
Expand Up @@ -93,14 +93,15 @@ float WeightedQuantile(double alpha, Iter begin, Iter end, WeightIter weights) {
}

namespace cuda {
float Median(Context const* ctx, linalg::TensorView<float const, 2> t, common::OptionalWeights weights);
float Median(Context const* ctx, linalg::TensorView<float const, 2> t,
common::OptionalWeights weights);
#if !defined(XGBOOST_USE_CUDA)
inline float Median(Context const*, linalg::TensorView<float const, 2>, common::OptionalWeights) {
common::AssertGPUSupport();
return 0;
}
#endif // !defined(XGBOOST_USE_CUDA)
}
} // namespace cuda

inline float Median(Context const* ctx, linalg::TensorView<float const, 2> t,
common::OptionalWeights weights) {
Expand Down

0 comments on commit 10c9c8c

Please sign in to comment.